Skip to content

Conversation

@wenxindongwork
Copy link
Collaborator

  1. Added support for uploading models directly to HuggingFace Hub. This means the user now has three options for saving a model: to local directory, to GCS, or to HuggingFace Hub.
  2. Added unit tests
  3. Updated docs.


model.save_in_hf_format(
local_dir_or_gs_bucket,
local_dir_or_gs_bucket_or_hf_hub,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just "destination"?

print(f"\n Created new HuggingFace Hub {repo_type} repo: {repo_id}.")


def copy_local_file_to_huggingface_hub(local_path, file_name, repo_id, repo_type):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Better use "upload" than "copy" to be consistent to the term both the hf API uses and the GCS interface uses.

@wenxindongwork
Copy link
Collaborator Author

Thank you for the code review!

@wenxindongwork wenxindongwork merged commit d3d31ca into main Mar 12, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants