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

[nnx] Improve spmd #3580

Merged
merged 1 commit into from
Jan 3, 2024
Merged

[nnx] Improve spmd #3580

merged 1 commit into from
Jan 3, 2024

Conversation

cgarciae
Copy link
Collaborator

What does this PR do?

  • Adds get_named_sharding function
  • Fixes a bugs in with_sharding_constraint and sharding_hook.

@codecov-commenter
Copy link

Codecov Report

Attention: 5 lines in your changes are missing coverage. Please review.

Comparison is base (008c3cc) 56.32% compared to head (3b77280) 56.31%.

Files Patch % Lines
flax/experimental/nnx/nnx/spmd.py 16.66% 5 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3580      +/-   ##
==========================================
- Coverage   56.32%   56.31%   -0.02%     
==========================================
  Files         100      100              
  Lines       11951    11957       +6     
==========================================
+ Hits         6731     6733       +2     
- Misses       5220     5224       +4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@superbobry superbobry left a comment

Choose a reason for hiding this comment

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

How hard would it be to add a test covering the changed code?

@copybara-service copybara-service bot merged commit e8a14af into main Jan 3, 2024
21 checks passed
@copybara-service copybara-service bot deleted the nnx-get-named-sharding branch January 3, 2024 19:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants