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

Fix caching error when offline and no refs dir #1307

Merged
merged 1 commit into from
Jan 25, 2023

Conversation

Wauplin
Copy link
Contributor

@Wauplin Wauplin commented Jan 24, 2023

Will not fix the root issue of #1305 but fixes the non-explicit FileNotFoundError that was raised (in favor of the documented and expected LocalEntryNotFoundError).

cc @NielsRogge for some reason downloading a file in your space failed due to a connection issue (infra issue ? HF_HUB_OFFLINE set ?). Instead of the proper LocalEntryNotFoundError (that is handled nicely in transformers) you had a FlieNotFoundError because the cache in your space was not initialized yet. This also explains why it's working locally on your computer (since I guess cache structure is already good). This PR should fix it.

@Wauplin Wauplin requested a review from LysandreJik January 24, 2023 10:40
@HuggingFaceDocBuilderDev
Copy link

HuggingFaceDocBuilderDev commented Jan 24, 2023

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

@Wauplin Wauplin merged commit 39a1d55 into main Jan 25, 2023
@Wauplin Wauplin deleted the 1305-caching-error-when-offline-and-no-refs-dir branch January 25, 2023 11:04
@NielsRogge
Copy link
Contributor

Thanks @Wauplin !

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.

3 participants