-
Notifications
You must be signed in to change notification settings - Fork 53
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
CI add cron job to CI #56
Conversation
I think we need to merge this and then test if it works. cc @skops-dev/maintainers |
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.
Agree, let's just try if it works and adjust if not. What's the worst that can happen :)
scripts/clean_skops.py
Outdated
print(f"deleting {model_info.modelId}") | ||
info = client.model_info(model_info.modelId, token=token) | ||
age = ( | ||
datetime.datetime.now(datetime.timezone.utc) - pd.to_datetime(info.lastModified) |
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.
If you don't want a pandas dependency to run the script, you could parse the time info as:
datetime.datetime.fromisoformat(info.lastModified.rsplit('.', 1)[0])
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.
That actually reminded me that I was missing the huggingface_hub
dependency here. Added that.
I changed to your version, but it's not the same as before, since it's now ignoring timezone info. Not a big deal in this case though.
Happy for this to be merged.
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.
Yeah, we could add the tz back but it's not that important.
Fixes #49
Only delete repos which haven't been touched for the past week, every night.