Skip to content

Commit

Permalink
Internal change.
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 650338500
  • Loading branch information
cpgaffney1 authored and Orbax Authors committed Jul 8, 2024
1 parent 2be2b79 commit 94eff14
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion checkpoint/orbax/checkpoint/path/atomicity.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,10 @@ def get(self) -> epath.Path:
"""Constructs the temporary path without actually creating it."""
...

def get_final(self) -> epath.Path:
"""Returns the final path without creating it."""
...

def create(
self,
*,
Expand Down Expand Up @@ -288,6 +292,9 @@ def match(cls, temporary_path: epath.Path, final_path: epath.Path) -> bool:
def get(self) -> epath.Path:
return self._tmp_path

def get_final(self) -> epath.Path:
return self._final_path

def create(
self,
*,
Expand Down Expand Up @@ -406,6 +413,9 @@ def match(cls, temporary_path: epath.Path, final_path: epath.Path) -> bool:
def get(self) -> epath.Path:
return self._tmp_path

def get_final(self) -> epath.Path:
return self._final_path

def create(
self,
*,
Expand Down Expand Up @@ -482,4 +492,4 @@ def on_commit_callback(
"""
tmp_dir.finalize()
step_lib.record_saved_duration(checkpoint_start_time)
logging.info('Finished saving checkpoint to `%s`.', tmp_dir.get())
logging.info('Finished saving checkpoint to `%s`.', tmp_dir.get_final())

0 comments on commit 94eff14

Please sign in to comment.