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

Allow metadata pass-through in flax.struct.field #4056

Merged
merged 1 commit into from
Aug 5, 2024

Conversation

cool-RR
Copy link
Contributor

@cool-RR cool-RR commented Jul 4, 2024

What does this PR do?

Allows passing through metadata when creating a flax.struct.field. This is useful when you want to add some metadata to your field to be read later.

Checklist

  • This PR fixes a minor issue (e.g.: typo or small bug) or improves the docs (you can dismiss the other
    checks if that's the case).
  • This change is discussed in a Github issue/
    discussion (please add a
    link).
  • The documentation and docstrings adhere to the
    documentation guidelines.
  • This change includes necessary high-coverage tests.
    (No quality testing = no merge!)

@cool-RR cool-RR marked this pull request as ready for review July 4, 2024 16:52
Copy link
Collaborator

@IvyZX IvyZX left a comment

Choose a reason for hiding this comment

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

Thanks for making this change! Can we have a test for this?

@cool-RR cool-RR force-pushed the patch-2 branch 3 times, most recently from ecd099e to 62b15bf Compare July 9, 2024 22:13
@cool-RR
Copy link
Contributor Author

cool-RR commented Jul 9, 2024

@IvyZX Pushed a test, let me know if anything else is needed.

@codecov-commenter
Copy link

codecov-commenter commented Jul 9, 2024

Codecov Report

Attention: Patch coverage is 0% with 2 lines in your changes missing coverage. Please review.

Project coverage is 0.00%. Comparing base (31adb00) to head (f2f76d9).
Report is 85 commits behind head on main.

Files Patch % Lines
flax/struct.py 0.00% 2 Missing ⚠️
Additional details and impacted files
@@          Coverage Diff           @@
##            main   #4056    +/-   ##
======================================
  Coverage   0.00%   0.00%            
======================================
  Files        106     107     +1     
  Lines      13582   13824   +242     
======================================
- Misses     13582   13824   +242     

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

Copy link
Collaborator

@IvyZX IvyZX left a comment

Choose a reason for hiding this comment

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

Thank you! Approved. You would need to pull and rebase for a trivial merge conflict.

@cool-RR
Copy link
Contributor Author

cool-RR commented Jul 10, 2024

@IvyZX Fixed.

@cool-RR
Copy link
Contributor Author

cool-RR commented Jul 19, 2024

@IvyZX Are we awaiting some automated process to get this merged?

@cool-RR
Copy link
Contributor Author

cool-RR commented Aug 5, 2024

@IvyZX Is this good for merging?

@copybara-service copybara-service bot merged commit 5694517 into google:main Aug 5, 2024
16 checks passed
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