Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[model:bugtype] ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all() #3962

Closed
jpangas opened this issue Jan 8, 2024 · 1 comment · Fixed by #3963
Assignees
Labels
bug Something isn't working

Comments

@jpangas
Copy link
Collaborator

jpangas commented Jan 8, 2024

Another bug to be looked at.


File "/usr/local/lib/python3.10/site-packages/bugbug/model.py", line 546, in <genexpr>
    classified_num = sum(1 for v in y_pred_filter if v != "__NOT_CLASSIFIED__")

ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()

Originally posted by @jpangas in #3958 (comment)

@jpangas
Copy link
Collaborator Author

jpangas commented Jan 8, 2024

We are counting classified_num for the multi-label cases. The current way works for the binary-label case only.
Proposed:
classified_num would be len(classified_indices) for multi-label cases.

bugbug/bugbug/model.py

Lines 546 to 547 in 0bcedc3

classified_num = sum(1 for v in y_pred_filter if v != "__NOT_CLASSIFIED__")

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants