Closed jonashaag closed 1 year ago
We pin pydantic because we haven't tested the gateway features with pydantic 2.0 yet.
@jonashaag I misread the issue title.
I won't have time to fix this in the next days, but with 2.6 import mlflow
is broken if you have anything in the environment that installs pydantic >=2
We are having this issue as well, one of major dependencies switched to pydantic v2 and now mlflow can't even be imported.
traceback:
File "..../lib/python3.9/site-packages/mlflow/gateway/config.py", line 79, in OpenAIConfig
@root_validator(pre=False)
File "..../lib/python3.9/site-packages/pydantic/deprecated/class_validators.py", line 228, 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`.
https://github.com/mlflow/mlflow/blob/2f9285a1c9635778f95c5cf767f5621442545f0b/requirements/gateway-requirements.txt#L5
I can send a PR soon