feat: add cache manager functionality#142
Draft
matthewhaynesonline wants to merge 3 commits into
Draft
Conversation
d58d607 to
d8918b2
Compare
- Move hardcoded strings into constants mod - Add path mod for FS path construction utils - Implement display / str traits for RepoType - Use path utils mod for path construction in lib
d0185b3 to
42d504d
Compare
- Port cache scanning and deletion strategy from python client _cache_manager.py - Add cache-manager feature flag for core functionality - Add cache-manager-display feature flag for table output - Add cache-manager example with usage docs Squashed commits: [d58d607] Clean up cargo file (to not enable cache manager by default) and also clean up example [968b82a] WIP cache manager [338f83f] WIP cache manager [e7a393e] WIP: cache manager
42d504d to
e20a8b8
Compare
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Depends on #143
Motivation
Begins the work of providing cache management features in the Rust client and providing parity with the Python client huggingface_hub/utils/_cache_manager.py. (which would be useful for a pet project I'm going to work on).
Summary
Note: there are some difference from the python implementation where it made sense from a rust perspective, but I tried to be faithful to the original.