DeepSpeed-MII icon indicating copy to clipboard operation
DeepSpeed-MII copied to clipboard

Import Error, not compatible with transformer package

Open tang-t21 opened this issue 1 year ago • 1 comments

File "/home/Qwen/infer.py", line 63, in import mii File "/usr/local/lib/python3.10/dist-packages/mii/init.py", line 7, in from .legacy import MIIServer, MIIClient, mii_query_handle, deploy, terminate, DeploymentType, TaskType, aml_output_path, MIIConfig, ModelConfig, get_supported_models File "/usr/local/lib/python3.10/dist-packages/mii/legacy/init.py", line 7, in from .client import MIIClient, mii_query_handle File "/usr/local/lib/python3.10/dist-packages/mii/legacy/client.py", line 12, in from .method_table import GRPC_METHOD_TABLE File "/usr/local/lib/python3.10/dist-packages/mii/legacy/method_table.py", line 8, in from transformers import Conversation ImportError: cannot import name 'Conversation' from 'transformers' (/usr/local/lib/python3.10/dist-packages/transformers/init.py)

tang-t21 avatar Jul 06 '24 21:07 tang-t21

Need to use an older version of transformer, but 'pip install deepspeed-mii' installs the latest one.

tang-t21 avatar Jul 07 '24 17:07 tang-t21

Need to use an older version of transformer, but 'pip install deepspeed-mii' installs the latest one.

I encountered this issue too. May I ask which version of transformer you use?

zyyyyy5 avatar Jul 18 '24 12:07 zyyyyy5

Hi @tang-t21 - this is resolved in the latest source builds of DeepSpeed-MII here https://github.com/microsoft/DeepSpeed-MII/pull/492. But we have not done a new release of MII that contains these fixes. We will work on this and update you when this is done soon.

loadams avatar Jul 18 '24 23:07 loadams

@tang-t21 - this is resolved in the latest release of DeepSpeed MII. If you hit any issues, please let us know and we can re-open this issue.

loadams avatar Jul 25 '24 23:07 loadams