Implement ignore_patterns in uploading (combined)#1130
Merged
Conversation
- Define DEFAULT_IGNORE_PATTERNS. - Implement should_ignore helper. - Update DirectoryArchive to support filtering for zip/tar formats. - Add unit tests for should_ignore and DirectoryArchive. TAG=agy CONV=2a820637-152b-46a6-9a45-e29918f1e322
TAG=agy CONV=2a820637-152b-46a6-9a45-e29918f1e322
- Update KaggleApi.upload_files to accept ignore_patterns. - Update model_instance_create and model_instance_version_create to accept and pass ignore_patterns. - Add --ignore-patterns CLI argument to model creation commands. - Add unit tests for model creation with ignore_patterns. TAG=agy CONV=2a820637-152b-46a6-9a45-e29918f1e322
TAG=agy CONV=2a820637-152b-46a6-9a45-e29918f1e322
TAG=agy CONV=2a820637-152b-46a6-9a45-e29918f1e322
- Update dataset_create_new and dataset_create_version to accept and pass ignore_patterns. - Add --ignore-patterns CLI argument to datasets create and version commands. TAG=agy CONV=2a820637-152b-46a6-9a45-e29918f1e322
TAG=agy CONV=2a820637-152b-46a6-9a45-e29918f1e322
TAG=agy CONV=2a820637-152b-46a6-9a45-e29918f1e322
- Update competition_data_update to accept and apply ignore_patterns during directory walk. - Add --ignore-patterns CLI argument to competitions data update command. TAG=agy CONV=2a820637-152b-46a6-9a45-e29918f1e322
TAG=agy CONV=2a820637-152b-46a6-9a45-e29918f1e322
TAG=agy CONV=2a820637-152b-46a6-9a45-e29918f1e322
TAG=agy CONV=2a820637-152b-46a6-9a45-e29918f1e322
…re-patterns-combined
Contributor
Author
|
Let me know if you prefer this single, combined PR or if the separate PRs for each entity (linked above) are easier to work with. I just noticed a lot of duplicated code in the separate PRs so I thought this might be easier. And if you prefer the others, go ahead and review them instead. |
rosbo
approved these changes
Jul 16, 2026
rosbo
left a comment
Contributor
There was a problem hiding this comment.
Great feature. Thanks for ensuring consistency across resources.
This was referenced Jul 16, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR combines all the work for implementing
ignore_patternsin model, dataset, and competition uploading, along with documentation.It contains changes from the following PRs (kept open for reference):
Key Changes:
DEFAULT_IGNORE_PATTERNSandshould_ignore(). UpdateDirectoryArchiveto filter files/dirs.ignore_patternsinto model uploading API and CLI (--ignore-patterns).ignore_patternsinto dataset uploading API and CLI (--ignore-patterns).ignore_patternsinto competition data update walk. Bypass defaults ifinclude_hiddenis True. Add CLI support.TAG=agy
CONV=2a820637-152b-46a6-9a45-e29918f1e322