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

Remove tree_map deprecation filter after Flax upgrades minimum Python version to 3.10 #3842

Open
chiamp opened this issue Apr 10, 2024 · 0 comments · May be fixed by #3836
Open

Remove tree_map deprecation filter after Flax upgrades minimum Python version to 3.10 #3842

chiamp opened this issue Apr 10, 2024 · 0 comments · May be fixed by #3836
Assignees
Labels
Priority: P2 - no schedule Best effort response and resolution. We have no plan to work on this at the moment.

Comments

@chiamp
Copy link
Collaborator

chiamp commented Apr 10, 2024

Context:

  • As of JAX 0.4.26, jax.tree_map is deprecated
  • updated tree_map #3823 renames all jax.tree_map usages to jax.tree_util.tree_map in Flax, however we get an error in CI because of a CLU dependency
  • After fixing CLU and pushing a new release, the error remains on CI for Python 3.9 tests
    • this is because Flax enforces an earlier version of CLU (before the tree_map fix) on python versions less than 3.10, since the match-case syntax used by CLU is only available in Python 3.10 or greater
    • i.e. because Flax supports a minimum Python version of 3.9, Flax must use an earlier CLU version (where the CLU fix has not landed yet), since the current CLU version with the fix uses a python syntax that isn't available until Python 3.10
  • Our current solution is to add a deprecation warning filter in added tree_map deprecation warning filter #3828

Once Flax upgrades its minimum Python version to 3.10, we should remove the deprecation warning filter and remove enforcing an earlier version of CLU.

@chiamp chiamp added the Priority: P2 - no schedule Best effort response and resolution. We have no plan to work on this at the moment. label Apr 10, 2024
@chiamp chiamp self-assigned this Apr 10, 2024
@chiamp chiamp linked a pull request Apr 10, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Priority: P2 - no schedule Best effort response and resolution. We have no plan to work on this at the moment.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant