Skip to content

Commit

Permalink
Implement a typestr() for PyGrainCheckpointHandler.
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 705160710
  • Loading branch information
BlaziusMaximus authored and copybara-github committed Dec 11, 2024
1 parent 1ed92a1 commit 567ade4
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions grain/_src/python/checkpoint_handlers.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,10 @@ def finalize(self, directory: epath.Path):
def close(self):
pass

@classmethod
def typestr(cls):
return f"{cls.__module__}.{cls.__qualname__}"


try:
# Register the handler to be used with the new checkpointing API if Orbax is
Expand Down

0 comments on commit 567ade4

Please sign in to comment.