-
Notifications
You must be signed in to change notification settings - Fork 106
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
Cache for HF file system is broken #661
Comments
@skshetry can this be closed? |
Cache is still broken. The above script might work because #730 stopped prefetching for HF. |
@skshetry thanks! does require an upstream fix? could you please summarize (or copy from the previous tickets / discussion). |
The base HF filesystem does not offer an asynchronous API, so there are two issues in our implementation:
Luckily for caching, it seems we are using For usages in
|
This commit wraps the HfFileSystem class to convert to an async filesystem. This is done by using the `AsyncFileSystemWrapper` class from the `fsspec` library, which requires `fsspec>=2024.12.0`. With the wrapper, all the functions will run in a separate thread in an executor, and won't block the main event-loop. This will now support all the async APIs that the `Client` expects, and will hence support caching of the files. The alternative here is to have two different implementations, one async and another sync, but that is too much of an effort at this time. Fixes #661.
Query to reproduce:
The text was updated successfully, but these errors were encountered: