Skip to content

Commit 469afdc

Browse files
committed
we also need the full path to submit the model to HF
1 parent b8981da commit 469afdc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

train.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -407,7 +407,7 @@ def train(train_cfg, vlm_cfg):
407407
# Push the best model to the hub (Please set your user name in the config!)
408408
if vlm_cfg.hf_repo_name is not None:
409409
print("Training complete. Pushing model to Hugging Face Hub...")
410-
hf_model = VisionLanguageModel.from_pretrained(vlm_cfg.vlm_checkpoint_path)
410+
hf_model = VisionLanguageModel.from_pretrained(os.path.join(vlm_cfg.vlm_checkpoint_path, run_name))
411411
hf_model.push_to_hub(vlm_cfg.hf_repo_name)
412412

413413
if train_cfg.log_wandb:

0 commit comments

Comments
 (0)