-
Notifications
You must be signed in to change notification settings - Fork 613
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
Select which files to delete in huggingface-cli delete-cache
#2219
Comments
huggingface-cli delete-cache
This is a valid feature request indeed. At the moment we can only delete specific revisions (usually Would you like to open a PR for it? :) |
Yeah, for sure I can. This would be my first time doing anything more than very superficial dev on a project like this (on GH, that is). Please be gentle :)
Going with > huggingface-cli repo-cache delete --all repo_id # same functionality as delete-cache but quick to delete just the one repo
> huggingface-cli repo-cache delete --include (glob) repo_id. # use same glob format as download --include flag; mark files to __include__ for delete action
> huggingface-cli repo-cache delete --exclude [glob] repo_id. # same as --include, but opposite
> huggingface-cli repo-cache delete --file-list (list of files to remove) repo_id I'll have a proper sit down at some point soon and see what's what. Are there timelines I should be aware of that you know of? |
Is your feature request related to a problem? Please describe.
The download tools all either dynamically or configurably download parts of a repo, since there are many times when the repo contains more files than needed (e.g. .pt, .safetensors). Once they're downloaded, you can't delete only part of the repo from your cache, and if you accidentally (or because you didn't know what you were doing) downloaded huge volumes of files, you can't delete just a part of it. The only option right now is to delete the whole repo and then re-download only what you want in your cache.
Describe the solution you'd like
Option to select files within a given cached repo, using the existing tools, that are to be deleted.
Describe alternatives you've considered
Manually manipulating files in the cache has gone..let's say "poorly" in the past. I've had to scrap my entire cache more than once doing that.
Additional context
n/a
The text was updated successfully, but these errors were encountered: