fix model card upload for PEFT models (#1043)

This commit is contained in:
Hamel Husain
2024-01-04 18:13:54 -08:00
committed by GitHub
parent f243c2186d
commit 31d23504a5

View File

@@ -188,6 +188,9 @@ def train(
if not cfg.hub_model_id:
trainer.create_model_card(model_name=cfg.output_dir.lstrip("./"))
elif cfg.hub_model_id:
# defensively push to the hub to ensure the model card is updated
trainer.push_to_hub()
return model, tokenizer