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

Integrate Orbax's emergency checkpoint. #820

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions axlearn/common/checkpointer_orbax.py
Original file line number Diff line number Diff line change
Expand Up @@ -346,9 +346,8 @@ def _restore_args(x: Any) -> ocp.RestoreArgs:
state=ocp.args.PyTreeRestore(item=state, restore_args=restore_args),
),
)
except TypeError as e:
# Orbax hits TypeError if there are no checkpoints, since it attempts to format `None`
# as the step dir.
except FileNotFoundError as e:
# Orbax raises FileNotFoundError if there are no checkpoints.
if step is not None:
raise ValueError(f"Failed to restore at step {step}.") from e
logging.info("Could not find any completed checkpoints under %s: %s", cfg.dir, e)
Expand Down
Loading