push_to_hubο
- class swift.hub.push_to_hub.push_to_hub(repo_name, output_dir, token=None, private=True, retry=3, commit_message='', tag=None, source_repo='', ignore_file_pattern=None, revision='master')[source]ο
- Parameters:
repo_name β The repo name for the modelhub repo
output_dir β The local output_dir for the checkpoint
token β The user api token, function will check the MODELSCOPE_API_TOKEN variable if this argument is None
private β If is a private repo, default True
retry β Retry times if something error in uploading, default 3
commit_message β The commit message
tag β The tag of this commit
source_repo β The source repo (model id) which this model comes from
ignore_file_pattern β The file pattern to be ignored in uploading.
revision β The branch to commit to
- Returns:
The boolean value to represent whether the model is uploaded.