-
Notifications
You must be signed in to change notification settings - Fork 425
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
Use arange and repeat for deterministic bincount #2184
Conversation
for more information, see https://pre-commit.ci
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## master #2184 +/- ##
======================================
Coverage 87% 87%
======================================
Files 293 293
Lines 16425 16423 -2
======================================
Hits 14279 14279
+ Misses 2146 2144 -2 |
Use arange instead of meashgrid Co-authored-by: Nicki Skafte Detlefsen <skaftenicki@gmail.com>
Update _bincount doc
Is there a blocker for merging this change? My team would love to incorporate it as the speed of validation metrics is currently slowing down our ability to iterate. |
Hi @daturkel, sorry nothing in principal stopping this from being merged, we have just not been around for the last couple of weeks. Trying to pick up the work now. |
All good @SkafteNicki , I appreciate the team's effort! Thanks for the update |
update changelog
Head branch was pushed to by a user without write access
update comment
* Use meshgrid for deterministic bincount * Update src/torchmetrics/utilities/data.py Use arange instead of meashgrid * Update data.py Update _bincount doc * chlog * size * Update CHANGELOG.md update changelog * Update data.py update comment * improve text --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Nicki Skafte Detlefsen <skaftenicki@gmail.com> Co-authored-by: Jirka Borovec <6035284+Borda@users.noreply.github.com> Co-authored-by: Jirka <jirka.borovec@seznam.cz> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> (cherry picked from commit 8ef2a89)
* Use meshgrid for deterministic bincount * Update src/torchmetrics/utilities/data.py Use arange instead of meashgrid * Update data.py Update _bincount doc * chlog * size * Update CHANGELOG.md update changelog * Update data.py update comment * improve text --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Nicki Skafte Detlefsen <skaftenicki@gmail.com> Co-authored-by: Jirka Borovec <6035284+Borda@users.noreply.github.com> Co-authored-by: Jirka <jirka.borovec@seznam.cz> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> (cherry picked from commit 8ef2a89)
What does this PR do?
Fixes #1413
Uses torch.arange and torch.repeat instead of a for loop to deterministically calculate bincount. Should run MUCH faster now.
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 🙃
📚 Documentation preview 📚: https://torchmetrics--2184.org.readthedocs.build/en/2184/