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

Fix torch.bincount when running in deterministic mode and on GPU #900

Merged
merged 16 commits into from
Mar 23, 2022

Conversation

SkafteNicki
Copy link
Member

@SkafteNicki SkafteNicki commented Mar 22, 2022

What does this PR do?

Fixes #880
Implement an alternative of torch.bincount when the user is running in deterministic mode and on GPU.

Before submitting

  • Was this discussed/approved via a Github issue? (no need for typos and docs improvements)
  • Did you read the contributor guideline, Pull Request section?
  • Did you make sure to update the docs?
  • Did you write any new necessary tests?

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 🙃

@SkafteNicki SkafteNicki added the bug / fix Something isn't working label Mar 22, 2022
@SkafteNicki SkafteNicki added this to the v0.8 milestone Mar 22, 2022
CHANGELOG.md Outdated Show resolved Hide resolved
@codecov
Copy link

codecov bot commented Mar 22, 2022

Codecov Report

Merging #900 (c430c5d) into master (434d22c) will decrease coverage by 5%.
The diff coverage is 60%.

@@          Coverage Diff           @@
##           master   #900    +/-   ##
======================================
- Coverage      95%    91%    -5%     
======================================
  Files         173    173            
  Lines        7241   7253    +12     
======================================
- Hits         6890   6571   -319     
- Misses        351    682   +331     

@SkafteNicki SkafteNicki changed the title Fix torch.bincount in Confusionmatrix when running in deterministic mode and on GPU Fix torch.bincount when running in deterministic mode and on GPU Mar 22, 2022
CHANGELOG.md Outdated Show resolved Hide resolved
tests/test_utilities.py Outdated Show resolved Hide resolved
torchmetrics/utilities/data.py Show resolved Hide resolved
torchmetrics/utilities/data.py Outdated Show resolved Hide resolved
@Borda Borda modified the milestones: v0.8, v0.7 Mar 22, 2022
@mergify mergify bot added the ready label Mar 22, 2022
SkafteNicki and others added 3 commits March 22, 2022 12:43
Co-authored-by: Justus Schock <12886177+justusschock@users.noreply.github.com>
@justusschock justusschock requested a review from Borda March 22, 2022 12:28
@Borda Borda enabled auto-merge (squash) March 22, 2022 16:33
@Borda
Copy link
Member

Borda commented Mar 23, 2022

@SkafteNicki seems that ERGAS is now failing on Windows with the latest configurations :/

UPDATE: it is unrelated, and fixing it in a6621cb

@mergify mergify bot removed the ready label Mar 23, 2022
@Borda Borda merged commit 0240d33 into master Mar 23, 2022
@Borda Borda deleted the bugfix/deterministic_gpu_confusionmatrix branch March 23, 2022 05:46
@mergify mergify bot added the ready label Mar 23, 2022
Borda pushed a commit that referenced this pull request Mar 23, 2022
* update all torch bincounts
* move test
* Apply suggestions from code review

Co-authored-by: Justus Schock <12886177+justusschock@users.noreply.github.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>

(cherry picked from commit 0240d33)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug / fix Something isn't working ready
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature Request] Deterministic ConfusionMatrix on GPU
3 participants