-
Notifications
You must be signed in to change notification settings - Fork 507
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
cannot import name 'cached_path' from 'transformers.file_utils' #344
Comments
transformers-4.21.1 won't fail |
I believe this will need to be patched to work for two versions of transformers: before 4.22.0 and after 4.22.0 The file utils were modified in this pull request: huggingface/transformers#18497 and a few later ones. Since many functions were removed and modified in 4.22.0, I looked into which functions would need to change. Below, the left side has the names that work for < 4.22.0, and the right side has the names of the new functions that can be used for >= 4.22.0. This was only from a brief skim of the old and new code: cached_path -> cached_file get_list_of_files -> (unsure) hf_bucket_url/is_remote_url -> get_file_from_repo |
Thanks for the detailed answer @nbroad1881 ! I opened #368 to fix the issues you listed. |
This is still an issue for me using transformers 4.31.0 - downgrading to 4.21 solved as a workaround. |
Hi @jermwatt, this issue should not happen anymore: optimum/optimum/configuration_utils.py Line 41 in 0b08a1f
|
System Info
Who can help?
No response
Information
Tasks
examples
folder (such as GLUE/SQuAD, ...)Reproduction
from optimum.onnxruntime import ORTQuantizer, ORTModelForTextClassification
Expected behavior
this would not be fail
The text was updated successfully, but these errors were encountered: