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

[FR] Natively support pydantic v2 (without deprecations notices) #13018

Closed
22 tasks
bonastreyair opened this issue Aug 28, 2024 · 2 comments
Closed
22 tasks

[FR] Natively support pydantic v2 (without deprecations notices) #13018

bonastreyair opened this issue Aug 28, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@bonastreyair
Copy link

bonastreyair commented Aug 28, 2024

Willingness to contribute

No. I cannot contribute this feature at this time.

Proposal Summary

Removal of pydantic deprecations when using v2

Motivation

What is the use case for this feature?

Be prepared and compatible with future pydantic 3.0, make usage of the best practices for current pydantic v2 and reduce the unnecessary warnings during tests of users applications.

Why is this use case valuable to support for MLFlow users in general?

Reduce the unnecessary warnings during tests of users applications when also using pydantic v2.

Why is this use case valuable to support for your project(s) or organization?

Reduce the unnecessary warnings during tests when also using pydantic v2.

Why is it currently difficult to achieve this use case?

As I user I can't modify mlflow code and remove the warnings, which adds difficulty on my debugging of my application.

Details

When running my unit tests application with a pydantic v2 dependency, I get this warnings that are confusing to the development, debugging and cleaning of warnings to be more difficult.

Identified deprecations

  • using @field_validator instead of @validator
.cache/poetry/virtualenvs/aC6kLp7V-py3.11/lib/python3.11/site-packages/mlflow/gateway/config.py:61
   /builds/application/.cache/poetry/virtualenvs/aC6kLp7V-py3.11//lib/python3.11/site-packages/mlflow/gateway/config.py:61: PydanticDeprecatedSince20: Pydantic V1 style `@validator` validators are deprecated. You should migrate to Pydantic V2 style `@field_validator` validators, see the migration guide for more details. Deprecated in Pydantic V2.0 to be removed in V3.0. See Pydantic V2 Migration Guide at https://errors.pydantic.dev/2.8/migration/
  • using ConfigDict instead of class-based config
.cache/poetry/virtualenvs/aC6kLp7V-py3.11/lib/python3.11/site-packages/pydantic/_internal/_config.py:291
  /builds/application/.cache/poetry/virtualenvs/aC6kLp7V-py3.11/lib/python3.11/site-packages/pydantic/_internal/_config.py:291: PydanticDeprecatedSince20: Support for class-based `config` is deprecated, use ConfigDict instead. Deprecated in Pydantic V2.0 to be removed in V3.0. See Pydantic V2 Migration Guide at https://errors.pydantic.dev/2.8/migration/

What component(s) does this bug affect?

  • area/artifacts: Artifact stores and artifact logging
  • area/build: Build and test infrastructure for MLflow
  • area/deployments: MLflow Deployments client APIs, server, and third-party Deployments integrations
  • area/docs: MLflow documentation pages
  • area/examples: Example code
  • area/model-registry: Model Registry service, APIs, and the fluent client calls for Model Registry
  • area/models: MLmodel format, model serialization/deserialization, flavors
  • area/recipes: Recipes, Recipe APIs, Recipe configs, Recipe Templates
  • area/projects: MLproject format, project running backends
  • area/scoring: MLflow Model server, model deployment tools, Spark UDFs
  • area/server-infra: MLflow Tracking server backend
  • area/tracking: Tracking Service, tracking client APIs, autologging

What interface(s) does this bug affect?

  • area/uiux: Front-end, user experience, plotting, JavaScript, JavaScript dev server
  • area/docker: Docker use across MLflow's components, such as MLflow Projects and MLflow Models
  • area/sqlalchemy: Use of SQLAlchemy in the Tracking Service or Model Registry
  • area/windows: Windows support

What language(s) does this bug affect?

  • language/r: R APIs and clients
  • language/java: Java APIs and clients
  • language/new: Proposals for new client languages

What integration(s) does this bug affect?

  • integrations/azure: Azure and Azure ML integrations
  • integrations/sagemaker: SageMaker integrations
  • integrations/databricks: Databricks integrations
@bonastreyair bonastreyair added the enhancement New feature or request label Aug 28, 2024
@bonastreyair
Copy link
Author

Some related PR:

@bonastreyair
Copy link
Author

closed due to duplication with: #12654

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant