Skip to content

doc: Fix Misleading Error Message for multiclass_precision #199

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions torcheval/metrics/functional/classification/precision.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,8 +160,8 @@ def _precision_compute(
# predictions and the ground truth.
bad_class = torch.nonzero(torch.isnan(precision))
logging.warning(
f"{bad_class} classes have zero instances in both the "
"predictions and the ground truth labels. Precision is still logged "
f"{bad_class} classes have zero instances in either the "
"predictions or the ground truth labels. Precision is still logged "
"as zero."
)

Expand Down