terra.push_model_to_hub#
- terra.push_model_to_hub(model_folder, repo_id, *, corpus=None, private=True, tag=None, license='cc-by-nc-4.0', training_data=None, paper_url=None, model_card=None, commit_message=None, prune_stale=True, token=None)#
Create (if needed) a Hugging Face model repo and upload a TERRA model bundle.
Only the standard bundle files present in
model_folderare uploaded (training cruft like optimizer state / logs / intermediate epochs is skipped). A model card is generated unlessmodel_cardis provided. Iftagis given, an immutable git tag is created on the uploaded revision – use it to pin the manuscript checkpoint (e.g.v1.0).When
prune_staleis set (default), bundle-type files (.pt/.pth/.pkl/.yaml/.yml/.csv) that exist on the Hub but are absent frommodel_folderare deleted in the same commit – so renamed/removed files (e.g. a pre-renameensembl_dic.pkl) don’t linger.README.mdand.gitattributesare never pruned.Returns the repository URL.
- Return type: