-
Notifications
You must be signed in to change notification settings - Fork 572
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
New git-aware cache file layout #801
Merged
Merged
Changes from 1 commit
Commits
Show all changes
47 commits
Select commit
Hold shift + click to select a range
6fa66c4
light typing
julien-c 29a8833
remove this seminal comment
julien-c da92022
I don't understand why we don't early return here
julien-c e4d3686
following last commit, unnest this
julien-c 8e4ccf4
[BIG] This should work for all repo_types not just models!
julien-c 5ab8b74
one more
julien-c b8376f8
forgot a repo_type and reorder code
julien-c 4cb1d63
also rename this cache folder
julien-c f7cbe18
Use `hf_hub_download`, will be simpler later
julien-c ea94d43
in this new version, `force_filename` does not make sense anymore
julien-c 7b92719
Just inline everything inside `hf_hub_download` for now
julien-c d29c90e
Big prototype! it works! :tada:
julien-c 02480fd
wip wip
julien-c f81885d
do not touch `cached_download`
julien-c 7fbd7a4
Prompt user to upgrade to `hf_hub_download`
julien-c d1e47a1
Add a `legacy_cache_layout=True` to preserve old behavior, just in case
julien-c fc930b6
Create `relative symlinks` + add some doc
julien-c f5420ed
Fix behavior when no network
julien-c 9f1e0f6
This test now is legacy
julien-c 973913e
Fix-ish conflict-ish
julien-c e9fb4d4
minimize diff
julien-c adaca46
refactor `repo_folder_name`
julien-c fff7e9f
windows support + shortcut if user passes a commit hash
julien-c 06c0ca1
Rewrite `snapshot_download` and make it more robust
julien-c e3e2485
OOops
julien-c 7051683
Create example-transformers-tf.py
julien-c 84ff68d
Fix + add a way more complete example (running on Ubuntu)
julien-c 11974d4
Apply suggestions from code review
julien-c 73cdb46
Update src/huggingface_hub/file_download.py
julien-c 9f8b876
Update src/huggingface_hub/file_download.py
julien-c 2c5c94b
Only allow full revision hashes otherwise the `revision != commit_has…
julien-c 35fff44
add a little bit more doc + consistency
julien-c 383022f
Update src/huggingface_hub/snapshot_download.py
LysandreJik 7112146
Update snapshot download
LysandreJik 8f99d22
First pass on tests
LysandreJik 01e3a61
Wrap up tests
LysandreJik 2d54dd1
:wolf: Fix for bug reported by @thomwolf
julien-c 8f71ad6
Special case for Windows
LysandreJik 442b5b1
Address comments and docs
LysandreJik e1ff4eb
Clean up with ternary cc @julien-c
LysandreJik e69ef4f
Add argument to `cached_download`
LysandreJik 0d06b55
Opt-in for filename_to-url
LysandreJik d6bb92e
Opt-in for filename_to-url
LysandreJik 4259642
Pass the flag
LysandreJik a8348ab
Update docs/source/package_reference/file_download.mdx
LysandreJik 8c599ee
Update src/huggingface_hub/file_download.py
LysandreJik 3dfc00c
Address review comments
LysandreJik File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
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.
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.
See side by side comparison of before/after @julien-c:
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.
Yep, looks great to me!
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.
the same logic exists in
hf_hub_download
no? (not 100% sure anymore)