Skip to content

Commit

Permalink
Everything is internal actually...
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 721514652
  • Loading branch information
mihaimaruseac authored and Orbax Authors committed Feb 1, 2025
1 parent 6e80ecc commit 39376f1
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
from orbax.checkpoint._src.path import atomicity_types



BarrierSyncFn = multihost.BarrierSyncFn
_DIRECTORY_CREATION_SIGNALS = [
synchronization.HandlerAwaitableSignal.STEP_DIRECTORY_CREATION
Expand All @@ -49,7 +50,8 @@ def _on_commit_callback(
):
"""Finalize atomic save and record checkpoint save metrics."""
atomicity.on_commit_callback(
tmpdir, checkpoint_start_time=checkpoint_start_time
tmpdir,
checkpoint_start_time=checkpoint_start_time,
)
total_duration_secs = time.time() - checkpoint_start_time
jax.monitoring.record_event_duration_secs(
Expand Down Expand Up @@ -441,7 +443,10 @@ def _callback() -> None:
threading.current_thread().name,
tmpdir.get(),
)
_on_commit_callback(tmpdir, checkpoint_start_time)
_on_commit_callback(
tmpdir,
checkpoint_start_time,
)

self._async_manager.start_async_commit(
directory,
Expand Down
3 changes: 2 additions & 1 deletion checkpoint/orbax/checkpoint/_src/path/atomicity.py
Original file line number Diff line number Diff line change
Expand Up @@ -552,7 +552,8 @@ def on_commit_callback(
Args:
tmp_dir: A temporary checkpoint directory, where the checkpoint data is
currently saved.
checkpoint_start_time: The time at which checkpoint saving began.
checkpoint_start_time: The time at which checkpoint saving began. # BEGIN
tree_verity_options: Options to configure checkpoint signing and integrity
"""
tmp_dir.finalize()
step_lib.record_saved_duration(checkpoint_start_time)
Expand Down
1 change: 1 addition & 0 deletions checkpoint/orbax/checkpoint/checkpoint_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@
from typing_extensions import Self # for Python version < 3.11



PyTree = Any
CheckpointDirs = Tuple[str, str]
SaveParams = Mapping[str, Any]
Expand Down
2 changes: 0 additions & 2 deletions checkpoint/orbax/checkpoint/options.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,5 +70,3 @@ class FileOptions:

path_permission_mode: Optional[int] = None



0 comments on commit 39376f1

Please sign in to comment.