Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
epwalsh committed Jan 24, 2025
1 parent 6207bf1 commit 842e927
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/olmo_core/distributed/checkpoint/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -584,8 +584,9 @@ def get_checkpoint_metadata(dir: PathOrStr) -> Metadata:
return storage_reader.read_metadata()
except FileNotFoundError as exc:
msg = f"'{dir}' does not appear to contain a state dict checkpoint."
if file_exists((suggested_path := join_path(dir, "model_and_optim/.metadata"))):
msg += f" Did you mean to use '{suggested_path}'?"
suggested_dir = join_path(dir, "model_and_optim")
if file_exists(join_path(suggested_dir, ".metadata")):
msg += f" Did you mean to use '{suggested_dir}'?"
raise FileNotFoundError(msg) from exc


Expand Down

0 comments on commit 842e927

Please sign in to comment.