-
-
Notifications
You must be signed in to change notification settings - Fork 655
Closed
Description
🐛 Bug description
When using the precision metric and the model output does not predict any positives (neither true or false), then Ignite throws an error:
ignite.exceptions.NotComputableError: Precision must have at least one example before it can be computed.
I guess this is expected because you can not compute the precision without any positives. But you would usually just apply an epsilon to the denominator and it is computable and you even do that in the code. But then I don't understand why to throw an error when positives are empty in the first place?
Maybe I am wrong here, but my intuition is that this check can just be removed.
Environment
- PyTorch Version: 1.8.1
- Ignite Version: 0.4.4
- OS: Linux
- How you installed Ignite: pip
- Python version: 3.9
failable