Skip to content

Commit

Permalink
support old ckpt loading
Browse files Browse the repository at this point in the history
  • Loading branch information
samsja committed Nov 6, 2024
1 parent b306f16 commit 67521af
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/zeroband/checkpoint.py
Original file line number Diff line number Diff line change
Expand Up @@ -437,6 +437,14 @@ def load(

world_info = get_world_info()

files = os.listdir(resume_ckpt_path)

if len(files) == 1 and files[0].startswith("diloco_"):
self._logger.warning(
f"Loading diloco ckpt from {files[0]}. This is deprecated and will be removed in the future"
)
resume_ckpt_path = os.path.join(resume_ckpt_path, files[0])

dcp.load(self.states, checkpoint_id=resume_ckpt_path)

if self.config.token_count is not None:
Expand Down

0 comments on commit 67521af

Please sign in to comment.