Skip to content

Commit

Permalink
move download_checkpoint_from_wandb from engine to runner
Browse files Browse the repository at this point in the history
  • Loading branch information
KuoHaoZeng committed Jul 12, 2024
1 parent 25cbe11 commit ecc24a9
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions allenact/algorithms/onpolicy_sync/runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -534,14 +534,15 @@ def start_train(

worker_ids = self.local_worker_ids(TRAIN_MODE_STR)

if "wandb://" == checkpoint[:8]:
ckpt_dir = "/tmp/wandb_ckpts"
os.makedirs(ckpt_dir, exist_ok=True)
checkpoint = download_checkpoint_from_wandb(
checkpoint,
ckpt_dir,
only_allow_one_ckpt=True
)
if checkpoint is not None:
if checkpoint[:8] == "wandb://":
ckpt_dir = "/tmp/wandb_ckpts"
os.makedirs(ckpt_dir, exist_ok=True)
checkpoint = download_checkpoint_from_wandb(
checkpoint,
ckpt_dir,
only_allow_one_ckpt=True
)

model_hash = None
for trainer_id in worker_ids:
Expand Down

0 comments on commit ecc24a9

Please sign in to comment.