Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support wildcards in huggingface-cli upload #2862

Open
Wauplin opened this issue Feb 14, 2025 · 4 comments
Open

Support wildcards in huggingface-cli upload #2862

Wauplin opened this issue Feb 14, 2025 · 4 comments
Labels
good first issue Good for newcomers

Comments

@Wauplin
Copy link
Contributor

Wauplin commented Feb 14, 2025

It would be a nice QoL improvement to be able to do

huggingface-cli upload my-cool-model *.safetensors

to upload all local safetensors files to the Hub at once.

At the moment this is possible by doing

huggingface-cli upload my-cool-model . --include="*.safetensors"

To do so, one would need to:

  • check if local_path contains a wildcard *
  • if yes, set local_path="." and include="*.safetensors" before calling upload_folder

cc @julien-c who begged for it on slack (internal link) 😂

@Wauplin Wauplin added the good first issue Good for newcomers label Feb 14, 2025
@devesh-2002
Copy link

Hi. I would like to work on this issue.

@mohitmarvania
Copy link

If possible, I would love to work on this issue, as this will be my first contribution to Hugging Face (Thus, might require some guidance in implementing test cases 😄).

@Wauplin
Copy link
Contributor Author

Wauplin commented Feb 15, 2025

Hi there! Thanks both for proposing yourself 🤗 To avoid having duplicated work, let's say that @devesh-2002 you can start working on it and ping us once you have a working PR.
@mohitmarvania if your first contribution is not on this one, feel free to pick another one to get started 😀

@Nafeessidd1
Copy link

Hey @Wauplin, this sounds like a great improvement! I’d love to work on it.

My plan is to update the CLI so that if local_path contains a , it automatically sets local_path="." and include=".safetensors" before calling upload_folder. That way, huggingface-cli upload my-cool-model *.safetensors will work just like the existing --include method

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

4 participants