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 wrong accumulation with average='none' #1046

Merged
merged 13 commits into from
May 27, 2022
Merged

Conversation

kpoeppel
Copy link
Contributor

@kpoeppel kpoeppel commented May 25, 2022

What does this PR do?

Fixes #1045, simply copying tensors before they are mutated in-place.

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 🙃

@Borda Borda changed the title Fix Issue #1045. Fix wrong accumulation with average='none' May 25, 2022
@Borda Borda added the bug / fix Something isn't working label May 25, 2022
Copy link
Member

@Borda Borda left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pls add the test mentioned in #1045

@codecov
Copy link

codecov bot commented May 25, 2022

Codecov Report

Merging #1046 (c2b49c9) into master (fa44471) will decrease coverage by 0%.
The diff coverage is 100%.

@@          Coverage Diff           @@
##           master   #1046   +/-   ##
======================================
- Coverage      95%     95%   -0%     
======================================
  Files         181     181           
  Lines        8004    8004           
======================================
- Hits         7582    7581    -1     
- Misses        422     423    +1     

@SkafteNicki
Copy link
Member

Hi @kpoeppel,
I cannot reproduce the behaviour you are reporting on master

@kpoeppel
Copy link
Contributor Author

kpoeppel commented May 27, 2022

@SkafteNicki :
I am sorry, somehow I added a wrong bug report code, it is updated now and I also checked it on master now.

@Borda:
Test is added now. For the specificity there is no error currently, but it is bad structure to assume that tn can be mutated.

@Borda Borda merged commit 8263e27 into Lightning-AI:master May 27, 2022
@mergify mergify bot added the ready label May 27, 2022
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.

Accuracy, Precision, Recall, Specificity wrong accumulation with average='none' inside Wrapper.
3 participants