安装deepspeed-mii后,我运行了以下命令:
import mii
它引发了这个错误:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/data/share/rwq/DeepSpeed-MII/mii/__init__.py", line 6, in <module>
from .server import MIIServer
File "/data/share/rwq/DeepSpeed-MII/mii/server.py", line 17, in <module>
from mii.config import ReplicaConfig
File "/data/share/rwq/DeepSpeed-MII/mii/config.py", line 42, in <module>
class MIIConfig(BaseModel):
File "/data/share/rwq/DeepSpeed-MII/mii/config.py", line 97, in MIIConfig
def auto_enable_load_balancing(cls, values):
File "/home/powerop/work/conda/envs/deepspeed/lib/python3.10/site-packages/pydantic/deprecated/class_validators.py", line 231, in root_validator
return root_validator()(*__args) # type: ignore
File "/home/powerop/work/conda/envs/deepspeed/lib/python3.10/site-packages/pydantic/deprecated/class_validators.py", line 237, in root_validator
raise PydanticUserError(
pydantic.errors.PydanticUserError: If you use `@root_validator` with pre=False (the default) you MUST specify `skip_on_failure=True`. Note that `@root_validator` is deprecated and should be replaced with `@model_validator`.
For further information visit https://errors.pydantic.dev/2.5/u/root-validator-pre-skip
如何解决?
1条答案
按热度按时间7gyucuyw1#
你安装了哪个版本的pydantic和deepspeed-mii?