From 9aedd25119032fcb9999d3489606db6b195f42dd Mon Sep 17 00:00:00 2001 From: KuoHaoZeng Date: Thu, 11 Jul 2024 19:09:40 -0700 Subject: [PATCH] fix bug --- allenact/utils/experiment_utils.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/allenact/utils/experiment_utils.py b/allenact/utils/experiment_utils.py index 9a1dfcba..a20ef6d4 100644 --- a/allenact/utils/experiment_utils.py +++ b/allenact/utils/experiment_utils.py @@ -1208,9 +1208,10 @@ def download_checkpoint_from_wandb(checkpoint_path_dir_or_pattern, all_ckpt_dir, return ckpts_paths else: assert len(ckpt_steps) == 1 - ckpt_fn = "{}-step-{}:latest".format(run_token, steps) + step = ckpt_steps[0] + ckpt_fn = "{}-step-{}:latest".format(run_token, step) artifact = api.artifact(ckpt_fn) _ = artifact.download("/tmp") - ckpt_dir = "{}/ckpt-{}.pt".format(all_ckpt_dir, steps) + ckpt_dir = "{}/ckpt-{}.pt".format(all_ckpt_dir, step) shutil.move("/tmp/ckpt.pt", ckpt_dir) return ckpt_dir \ No newline at end of file