conda-forge / mlflow-feedstock

A conda-smithy repository for mlflow.
BSD 3-Clause "New" or "Revised" License
1 stars 26 forks source link

Pydantic must be pinned < 2 #140

Closed jonashaag closed 1 year ago

jonashaag commented 1 year ago

https://github.com/mlflow/mlflow/blob/2f9285a1c9635778f95c5cf767f5621442545f0b/requirements/gateway-requirements.txt#L5

I can send a PR soon

harupy commented 1 year ago

We pin pydantic because we haven't tested the gateway features with pydantic 2.0 yet.

harupy commented 1 year ago

@jonashaag I misread the issue title.

jonashaag commented 1 year ago

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

zeyueN commented 1 year ago

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`.