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 MetricCollection when input are metrics that return dicts with same keywords #2027

Merged
merged 11 commits into from
Aug 28, 2023

Conversation

SkafteNicki
Copy link
Member

@SkafteNicki SkafteNicki commented Aug 26, 2023

What does this PR do?

Fixes #2020
Currently if metric collection have multiple metrics in the collection that returns dicts and some of the keys in those dicts are the same, it only returns the results of the last metric (because it is overwriting the key). Fixes this.

Before submitting
  • Was this discussed/agreed 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 🙃


📚 Documentation preview 📚: https://torchmetrics--2027.org.readthedocs.build/en/2027/

@SkafteNicki SkafteNicki added the bug / fix Something isn't working label Aug 26, 2023
@SkafteNicki SkafteNicki added this to the v1.1.x milestone Aug 26, 2023
@mergify mergify bot removed the has conflicts label Aug 28, 2023
@Borda Borda enabled auto-merge (squash) August 28, 2023 11:37
@mergify mergify bot removed the has conflicts label Aug 28, 2023
@Borda
Copy link
Member

Borda commented Aug 28, 2023

@Borda Borda disabled auto-merge August 28, 2023 15:55
@Borda Borda enabled auto-merge (squash) August 28, 2023 15:56
@codecov
Copy link

codecov bot commented Aug 28, 2023

Codecov Report

Merging #2027 (c63de49) into master (63c7bbe) will increase coverage by 0%.
The diff coverage is 95%.

Additional details and impacted files
@@          Coverage Diff           @@
##           master   #2027   +/-   ##
======================================
  Coverage      87%     87%           
======================================
  Files         277     277           
  Lines       15730   15746   +16     
======================================
+ Hits        13642   13657   +15     
- Misses       2088    2089    +1     

@mergify mergify bot added the ready label Aug 28, 2023
@Borda Borda merged commit 58fc9c6 into master Aug 28, 2023
63 checks passed
@Borda Borda deleted the fix/same_dict_metriccollection branch August 28, 2023 20:09
Borda pushed a commit that referenced this pull request Aug 28, 2023
…same keywords (#2027)

Co-authored-by: Jirka Borovec <[email protected]>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Co-authored-by: Jirka <[email protected]>
(cherry picked from commit 58fc9c6)
matsumotosan pushed a commit to matsumotosan/metrics that referenced this pull request Sep 19, 2023
…same keywords (Lightning-AI#2027)

Co-authored-by: Jirka Borovec <[email protected]>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Co-authored-by: Jirka <[email protected]>
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.

MetricCollection NOT working for MeanAveragePrecision
3 participants