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

try_to_load_from_cache returns cached non-existence #1039

Merged
merged 1 commit into from
Sep 9, 2022

Conversation

sgugger
Copy link
Contributor

@sgugger sgugger commented Sep 7, 2022

This PR aligns try_to_load_from_cache with its Transformers counterpart to return a special value when a file does not exist for a given repo/revision and that fact has been cached.

@HuggingFaceDocBuilderDev
Copy link

HuggingFaceDocBuilderDev commented Sep 7, 2022

The documentation is not available anymore as the PR was closed or merged.

@codecov
Copy link

codecov bot commented Sep 7, 2022

Codecov Report

Merging #1039 (ba9ba24) into main (8e5f219) will increase coverage by 0.01%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main    #1039      +/-   ##
==========================================
+ Coverage   83.01%   83.03%   +0.01%     
==========================================
  Files          36       36              
  Lines        3822     3825       +3     
==========================================
+ Hits         3173     3176       +3     
  Misses        649      649              
Impacted Files Coverage Δ
src/huggingface_hub/file_download.py 85.56% <100.00%> (+0.11%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@Wauplin
Copy link
Contributor

Wauplin commented Sep 8, 2022

(Note: related to huggingface/transformers#18871)

Copy link
Contributor

@Wauplin Wauplin left a comment

Choose a reason for hiding this comment

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

Looks good to me. Thanks for taking care of the docstring and the tests.

@Wauplin
Copy link
Contributor

Wauplin commented Sep 8, 2022

Will fix #1033.

Copy link
Member

@LysandreJik LysandreJik left a comment

Choose a reason for hiding this comment

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

Nice, thank you for completing the docs!

@sgugger sgugger merged commit 0c7b7ef into main Sep 9, 2022
@sgugger sgugger deleted the Load_cache_alignment branch September 9, 2022 19:06
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.

4 participants