-
Notifications
You must be signed in to change notification settings - Fork 755
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
JAX checkpointing via Orbax #1491
base: master
Are you sure you want to change the base?
Conversation
From the information here https://orbax.readthedocs.io/en/latest/, Orbax is not a package, but rather a separate package for each functionality provided by the Orbax namespace. For checkpoint, we need orbax-checkpoint |
4764729
to
458d880
Compare
I've updated the import to only require |
As checkpoint is a very basic tool, I think it is ok to add it to the required package dependency. |
4fedf8e
to
827f686
Compare
827f686
to
42706b3
Compare
Added orbax-checkpoint as a top level import and a package wide dependency. Still have |
@@ -1,5 +1,6 @@ | |||
matplotlib | |||
numpy | |||
orbax-checkpoint |
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.
Need to move this to the JAX part below.
@@ -37,6 +37,7 @@ classifiers = [ | |||
dependencies = [ | |||
"matplotlib", | |||
"numpy", | |||
"orbax-checkpoint", |
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.
Not add here.
@@ -1,5 +1,6 @@ | |||
matplotlib | |||
numpy | |||
orbax-checkpoint |
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.
Not add here.
Split from #1490 . Provides a very basic checkpointing functionality for flax based JAX models via Orbax. Essentially follows the simple example from flax documentation, without the use of the context manager.
As noted in #1490 , Orbax is currently imported lazily (only imported once first called) in a non PEP8 compliant manner, to avoid requiring Orbax as a package dependency. I feel that there should be a better way to do this, but I can't currently think of one.
As such, I've marked this as a draft for now.
Any thought or suggestions are greatly appreciated!