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: bypass hf cache retrieval bug #199

Merged
merged 1 commit into from
Jan 24, 2023
Merged

Conversation

brycedrennan
Copy link
Owner

Creates empty folder so huggingface hub is happy.
huggingface/huggingface_hub#1306

If one uses `hf_hub_download` only referencing specific commits the `refs` folder will not be created even though data will be cached via `snapshots` and `blobs`.  Subsequent calls to `try_to_load_from_cache` will return None even though the desired data was in the cache.

Example:

```python
# download something
hf_hub_download(repo_id=repo, revision=commit_hash, filename=filepath, token=token)
# returns None
try_to_load_from_cache(repo_id=repo, revision=commit_hash, filename=filepath)
```

huggingface/huggingface_hub#1306
@brycedrennan brycedrennan merged commit 9212f02 into master Jan 24, 2023
@brycedrennan brycedrennan deleted the bd/hf-dl-workaround branch January 24, 2023 04:22
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.

1 participant