-
Notifications
You must be signed in to change notification settings - Fork 632
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
1025 add time details to scan cache #1045
Conversation
The documentation is not available anymore as the PR was closed or merged. |
Codecov Report
@@ Coverage Diff @@
## main #1045 +/- ##
==========================================
+ Coverage 83.69% 83.76% +0.07%
==========================================
Files 37 37
Lines 3919 3949 +30
==========================================
+ Hits 3280 3308 +28
- Misses 639 641 +2
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
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.
This looks good to me. Thanks!
Nitpick: It ends up taking a bit of place in my terminal, I wonder if we shouldn't put it behind a verbose flag?
t5-small model 970.7M 11 refs/pr/1, main /Users/lucain/.cache/huggingface/hub/models--t5-small | ||
REPO ID REPO TYPE SIZE ON DISK NB FILES LAST_ACCESSED LAST_MODIFIED REFS LOCAL PATH | ||
--------------------------- --------- ------------ -------- ------------- ------------- ------------------- ------------------------------------------------------------------------- | ||
glue dataset 116.3K 15 4 days ago 4 days ago 2.4.0, main, 1.17.0 /home/wauplin/.cache/huggingface/hub/datasets--glue |
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.
Did you switch to Linux in between PRs? 😄
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.
Ahah, yes 😁
@LysandreJik thanks for the review ! About the nitpick, I agree that it's not optimal. There is another issue (#1024) to add options to this command to have a csv-like output/to select columns. I think it makes sense to address that in a following PR (by default I would also remove the "LOCAL PATH" column that takes far too much space and can be very long) |
Add
last_modified
andlast_accessed
info to the cache scanner. Scanned as float values (timestamp) and displayed as "timesince" string (2 weeks ago
).This is a preliminary work for the #1025.
Implementation is based on python's
os.stat
function and applied only to the blob files themselves and not the symlinks (that are more platform-dependent).