-
Notifications
You must be signed in to change notification settings - Fork 27.1k
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
[Flax] Bump to v0.4.1 #17966
[Flax] Bump to v0.4.1 #17966
Conversation
Nice finding! I am not competent regarding which versions we want to always support, but LGTM |
The documentation is not available anymore as the PR was closed or merged. |
7e94703
to
f9d9b99
Compare
f9d9b99
to
efa69eb
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch! I'm fine with always using the latest flax
version
Thanks @patil-suraj! The latest version would be v0.5.2 (see https://github.com/google/flax/releases). Is the best way to test this by setting |
IMO we should also try to stay compatible with older Flax versions, so let's not go as high as we can but only as high as we have to! PR looks good to me - but let's try to not always use the most recent Flax features in order to stay compatible with older versions as well |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok to bump out of necessity (nice find @sanchit-gandhi) - not because it's best to force the user to always use the newest version. E.g. one might very well have an old research project that only works with Flax 0.3.5, but would like to use the newest transformers. Now, the person could not combine the two -> let's try to stay compatible with older versions in the future :-)
Thanks for the details @patrickvonplaten. I'm in agreement that we should avoid potentially breaking use cases purely for the sake of being on the latest version, but try and integrate the latest features where applicable. Interestingly, I actually went away and had a play with three different versions of Flax on my personal research project https://github.com/sanchit-gandhi/seq2seq-speech:
Seems like v0.4.2 sits in the sweet spot for newer Flax version whilst providing backwards compatibility! |
Yes, but it's often worth to also not directly implement all the new features of Flax since:
|
What does this PR do?
The
flatten_dict
operator with the kwarg argumentsep
was added tomodeling_flax_utils
in #17760:transformers/src/transformers/modeling_flax_utils.py
Line 127 in f25457b
This kwarg was only added to Flax in v0.4.1: https://github.com/google/flax/releases/tag/v0.4.1
This PR bumps the required Flax version in Transformers from v0.3.5 to v0.4.1.
Before submitting
Pull Request section?
to it if that's the case.
documentation guidelines, and
here are tips on formatting docstrings.
Who can review?
Anyone in the community is free to review the PR once the tests have passed. Feel free to tag
members/contributors who may be interested in your PR.
cc @ArthurZucker