Skip to content
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

ImportError: cannot import name 'ShardedDDPOption' from 'transformers.trainer_utils' #866

Closed
ubermenchh opened this issue Dec 5, 2023 · 2 comments
Assignees

Comments

@ubermenchh
Copy link


ImportError Traceback (most recent call last)
in <cell line: 15>()
13 from intel_extension_for_transformers.transformers import OptimizedModel, QuantizationConfig
14 from intel_extension_for_transformers.transformers import metrics as nlp_metrics
---> 15 from intel_extension_for_transformers.transformers.trainer import NLPSeq2SeqTrainer
16 from transformers import (
17 AutoConfig,

/content/itrex/intel_extension_for_transformers/transformers/trainer.py in
66 nested_numpify,
67 )
---> 68 from transformers.trainer_utils import (
69 HPSearchBackend,
70 ShardedDDPOption,

ImportError: cannot import name 'ShardedDDPOption' from 'transformers.trainer_utils' (/usr/local/lib/python3.10/dist-packages/transformers/trainer_utils.py)

@XinyuYe-Intel
Copy link
Collaborator

Hi @ubermenchh , this issue is caused by the deprecation of ShardedDDPOption in transformers since version 4.35.0.
We are working to fix this issue, meanwhile, you can try lower versioned transformers, e.g. v4.34.1.

@ubermenchh
Copy link
Author

Yeah its working with 4.34.1. Thanks

delock pushed a commit to delock/intel-extension-for-transformers that referenced this issue Dec 16, 2023
* unify get_tensor_shapes

* low_precision_exp injector refactor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants