transformers
transformers copied to clipboard
Cannot import name 'deepspeed_reinit' from 'transformers.deepspeed'
System Info
Bug found when following the optimization steps provided in https://huggingface.co/blog/optimum-inference.
It seems like transformers/deepspeed.py does not contain the method 'deepspeed_reinit' so it's not possible to import it when loading ORTModel objects.
Thanks in advance for your incredible work. @stas00, @pacman100
Who can help?
No response
Information
- [X] The official example scripts
- [ ] My own modified scripts
Tasks
- [X] An officially supported task in the
examples
folder (such as GLUE/SQuAD, ...) - [ ] My own task or dataset (give details below)
Reproduction
Install optimum[onnxruntime]==1.2.0
Run: from optimum.onnxruntime import ORTModelForQuestionAnswering or import optimum.onnxruntime
Expected behavior
The package should import the ORTModels without any issue, enabling the optimization of the ONNX models using DeepSpeed
Hi @rubenCrayon!
deepspeed_reinit
was removed a few versions ago, you should use a more recent version of Optimum. Which may requires to change your script a bit, in that case I recommend that you open an issue in Optimum: https://github.com/huggingface/optimum/issues
This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread.
Please note that issues that do not follow the contributing guidelines are likely to be ignored.