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

Feature: merge_state method #2786

Merged
merged 33 commits into from
Oct 30, 2024
Merged

Feature: merge_state method #2786

merged 33 commits into from
Oct 30, 2024

Conversation

SkafteNicki
Copy link
Member

@SkafteNicki SkafteNicki commented Oct 15, 2024

What does this PR do?

Fixes #2643
Seems most of the logic is already implemented in private methods so it is really just creating a public method + testing.

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--2786.org.readthedocs.build/en/2786/

@SkafteNicki SkafteNicki added the enhancement New feature or request label Oct 15, 2024
@SkafteNicki SkafteNicki added this to the v1.5.0 milestone Oct 15, 2024
@SkafteNicki SkafteNicki marked this pull request as ready for review October 18, 2024 13:33
src/torchmetrics/metric.py Outdated Show resolved Hide resolved
src/torchmetrics/metric.py Outdated Show resolved Hide resolved
Copy link

codecov bot commented Oct 18, 2024

Codecov Report

Attention: Patch coverage is 31.25000% with 11 lines in your changes missing coverage. Please review.

Project coverage is 69%. Comparing base (76c502b) to head (5fefa58).
Report is 2 commits behind head on master.

Additional details and impacted files
@@          Coverage Diff           @@
##           master   #2786   +/-   ##
======================================
- Coverage      69%     69%   -0%     
======================================
  Files         342     342           
  Lines       18699   18712   +13     
======================================
+ Hits        12910   12912    +2     
- Misses       5789    5800   +11     

@mergify mergify bot removed the has conflicts label Oct 18, 2024
@SkafteNicki SkafteNicki modified the milestones: v1.5.0, v1.6.0 Oct 21, 2024
@SkafteNicki SkafteNicki self-assigned this Oct 22, 2024
@mergify mergify bot added the ready label Oct 24, 2024
@SkafteNicki
Copy link
Member Author

@Borda can you help me with the failing docs. It fails with error:
/home/runner/work/torchmetrics/torchmetrics/src/torchmetrics/metric.py:docstring of torchmetrics.metric.Metric:6: WARNING: Explicit markup ends without a blank line; unexpected unindent.
I know it complain about missing blank line but I feel like I tried everything at this point.

@Borda Borda requested a review from baskrahmer October 25, 2024 07:52
src/torchmetrics/metric.py Outdated Show resolved Hide resolved
@mergify mergify bot removed the ready label Oct 29, 2024
@Borda
Copy link
Member

Borda commented Oct 29, 2024

still:

/home/jirka/Workingspace/pt-metrics/src/torchmetrics/metric.py:docstring of torchmetrics.metric.Metric:6: WARNING: Explicit markup ends without a blank line; unexpected unindent.
/home/jirka/Workingspace/pt-metrics/src/torchmetrics/metric.py:docstring of torchmetrics.metric.Metric:7: WARNING: Explicit markup ends without a blank line; unexpected unindent.

@Borda Borda enabled auto-merge (squash) October 29, 2024 13:55
@mergify mergify bot added ready and removed has conflicts labels Oct 29, 2024
Copy link
Contributor

@lantiga lantiga left a comment

Choose a reason for hiding this comment

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

Awesome! Might be worth creating an example on how to use TorchMetrics within a 2D or 3D parallel DTensor-based codebase in the future.

@Borda Borda disabled auto-merge October 30, 2024 20:40
@Borda Borda merged commit 70dabf1 into master Oct 30, 2024
45 of 50 checks passed
@Borda Borda deleted the feature/merge_state branch October 30, 2024 20:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support equivalent of torcheval's merge_state
3 participants