Cannot import required library (Repost after multiple attempts at workarounds)
Fshrink opened this issue · 2 comments
To Reproduce
pip install simpletransformers
or ipython
from transformers import cached_path
Expected behavior
Install would complete and library would be functional
Desktop (please complete the following information):
Linux Ubuntu 22.10 Laptop - CPU only
transformers
version: 4.29.1- Platform: Linux-5.19.0-41-generic-x86_64-with-glibc2.36
- Python version: 3.11.3
- Huggingface_hub version: 0.14.1
- Safetensors version: not installed
- PyTorch version (GPU?): 2.0.1 (False)
- Tensorflow version (GPU?): not installed (NA)
- Flax version (CPU?/GPU?/TPU?): not installed (NA)
- Jax version: not installed
- JaxLib version: not installed
- Using GPU in script?: n
Additional context
Add any other context about the problem here.
Not being able to import this library throws a wrench in pretty much everything downstream, including in the model.py. It eventually prevents to properly load trained saved model.
Huggingface says it's a simpletransformers issue.
Thanks!!
This is a bug because cached_path utility is not used any longer by transformers. It has been replaced by the huggingface_hub library. Can one dev please include this in upcoming patch? Thank you.
Workaround is to install 'cached-path' through pip or other means and to replace "from transformers import cached_path" with "from cached_path import cached_path"