From 842e92781436a58271008f9ef44e082ac5e0927f Mon Sep 17 00:00:00 2001 From: epwalsh Date: Fri, 24 Jan 2025 09:25:00 -0800 Subject: [PATCH] fix --- src/olmo_core/distributed/checkpoint/__init__.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/olmo_core/distributed/checkpoint/__init__.py b/src/olmo_core/distributed/checkpoint/__init__.py index 44909785..f5821e62 100644 --- a/src/olmo_core/distributed/checkpoint/__init__.py +++ b/src/olmo_core/distributed/checkpoint/__init__.py @@ -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