Skip to content
Merged
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