-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
Fix false num_classes warning in metrics #2781
Conversation
Hello @pwwang! Thanks for updating this PR. There are currently no PEP 8 issues detected in this Pull Request. Cheers! 🍻 Comment last updated at 2020-07-31 22:05:11 UTC |
Put to_categorical before get_num_classes in metrics/functional/classification.py
Remove whitespaces in blank line.
Can you fix failing CIs? |
@pwwang mind rebase on master, these issues have been fixed today on master :] |
Codecov Report
@@ Coverage Diff @@
## master #2781 +/- ##
=======================================
- Coverage 91% 86% -4%
=======================================
Files 76 76
Lines 6787 6787
=======================================
- Hits 6150 5863 -287
- Misses 637 924 +287 |
this is strange, it speaks the stats even the condition of waiting for all 22 builds is not fulfill, just checked codecov and it has only 18 builds and still, it speaks... |
* Faster classfication stats * Faster accuracy metric * minor change on cls metric * Add out-of-bound class clamping * Add more tests and minor fixes * Resolve code style warning * Update for #2781 * hotfix * Update pytorch_lightning/metrics/functional/classification.py Co-authored-by: Jirka Borovec <[email protected]> * Update about conversation * Add docstring on stat_scores_multiple_classes Co-authored-by: Younghun Roh <[email protected]> Co-authored-by: Jirka Borovec <[email protected]>
* Faster classfication stats * Faster accuracy metric * minor change on cls metric * Add out-of-bound class clamping * Add more tests and minor fixes * Resolve code style warning * Update for #2781 * hotfix * Update pytorch_lightning/metrics/functional/classification.py Co-authored-by: Jirka Borovec <[email protected]> * Update about conversation * Add docstring on stat_scores_multiple_classes * Fixing #2862 Co-authored-by: Younghun Roh <[email protected]> Co-authored-by: Jirka Borovec <[email protected]>
What does this PR do?
Put to_categorical before get_num_classes in metrics/functional/classification.py, which fixes false warning about num_classes.
Fixes #2768
Before submitting
PR review
Anyone in the community is free to review the PR once the tests have passed.
If we didn't discuss your PR in Github issues there's a high chance it will not be merged.
Did you have fun?
Make sure you had fun coding 🙃