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

Internal change #4243

Merged
merged 1 commit into from
Oct 1, 2024
Merged
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
2 changes: 2 additions & 0 deletions flax/training/checkpoints.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
from flax import config, core, errors, io, serialization, traverse_util
from flax.training import orbax_utils


_READ_CHECKPOINT_EVENT: str = '/jax/checkpoint/read/durations_sec'
_WRITE_CHECKPOINT_EVENT: str = '/jax/checkpoint/write/durations_sec'

Expand Down Expand Up @@ -1136,6 +1137,7 @@ def restore_checkpoint(
)
return restored

# Legacy Flax checkpoint restoration.
ckpt_size = io.getsize(ckpt_path)
with io.GFile(ckpt_path, 'rb') as fp:
if parallel and fp.seekable():
Expand Down
Loading