-
Notifications
You must be signed in to change notification settings - Fork 204
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
Consider using cached-path crate in resources module #72
Comments
Hi @epwalsh nice crate and seems to align well with the current resources downloader. The check for Etag and file locks is a nice addition. I am trying to be mindful of the dependencies pulled in the project. I see you are relying on the |
Hey @guillaume-be, yeup, that sounds good. Didn't realize |
Just made a PR to switch over: epwalsh/rust-cached-path#18 |
@epwalsh Thank you - this looks good. I also noticed that the crate currently does not have further dependencies - which is fine on my side. Because of this I believe a good unit test and integration test coverage would be extremely helpful. Could you please add test for key functionalities of the crate (e.g. file lock, cache corruption, Etag check) in either unit or integration tests and add them to the CI? |
Hey @guillaume-be, are you asking me to add tests to the |
Sorry I missed those! |
Hey @guillaume-be, I wrote a Rust version of the functionality you find in
file_utils.py
fromtransformers
(andallennlp
) calledcached-path
. This could make the resources module more robust.cached-path
knows when to update a resource based on the Etag, and ensures the cache is never corrupted if a download fails for any reason. It also avoids race conditions by using file locks.Let me know what you think.
The text was updated successfully, but these errors were encountered: