-
Notifications
You must be signed in to change notification settings - Fork 266
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
feat(@huggingface/hub): adding scanCacheDir
#908
feat(@huggingface/hub): adding scanCacheDir
#908
Conversation
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.
Thanks for the PR!
Just to be clear, is this PR intended to interact with the cache folder created by the python lib? (cc @Wauplin)
Because the JS lib does not (yet?) cache files locally
Yes, and hopefully the js library will allow to download model in the cache 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.
Thanks for the PR!
Lots of comments but it's mostly on the exposed API, technically the PR is good :)
Also, a small section in packages/hub/README.md
would be great, and a doc comment on the main functions
The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update. |
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.
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.
Thanks @axel7083 for the work! The implementation looks good at first glance except a question related to paths. I would also add a warning in the docs to mention that the JS client doesn't use the cache system itself (should avoid some misunderstanding).
Co-authored-by: Lucain <lucainp@gmail.com>
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.
Looks good!
Thanks! |
Description
Took https://github.com/huggingface/huggingface_hub/blob/main/src/huggingface_hub/utils/_cache_manager.py as heavy inspiration for the implementation.
This is a very basic implementation, which do not cover the deletion.
Related issue
Fixes #905
Usage