-
Notifications
You must be signed in to change notification settings - Fork 36
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
Implement optional ignore_patterns
parameter for model upload.
#147
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like GitHub is using black
for formatting. You might not want to change settings in VS Code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the refactor and for the great test cases.
To help you debug the type error in python 3.7 and 3.9, you can pass the |
ignore_patterns
parameter for model upload.ignore_patterns
parameter for model upload.
Changes:
gcs_upload.py
for simplicity (let me know if this better be in a separate PR):_upload_file_or_folder
ignore_patterns
formodel_upload
models.DEFAULT_IGNORE_PATTERNS
DEFAULT_IGNORE_PATTERNS
+ignore_patterns
(user provided). This is consistent with hf api (https://github.com/huggingface/huggingface_hub/blob/main/src/huggingface_hub/hf_api.py#L4854)FIX=354710562
Tested (end to end)
Upload command:
kagglehub.model_upload("limakaggle/testignore/pytorch/2", "/tmp/ignoremodel", ignore_patterns=["original/", ".gitattribute"])
Uploaded model