fix: migrate deprecated Pydantic v1 class Config with ConfigDict for pydantic v2 compatabilty#496
fix: migrate deprecated Pydantic v1 class Config with ConfigDict for pydantic v2 compatabilty#496haroon0x wants to merge 2 commits into
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
🎉 Welcome to the Kubeflow SDK! 🎉 Thanks for opening your first PR! We're happy to have you as part of our community 🚀 Here's what happens next:
Join the community:
Feel free to ask questions in the comments if you need any help or clarification! |
There was a problem hiding this comment.
Pull request overview
Replaces deprecated Pydantic v1 class Config pattern with v2 model_config = ConfigDict(...) to eliminate PydanticDeprecatedSince20 warnings.
Changes:
- Updated
LocalBackendStepandLocalBackendJobsto useConfigDict. - Updated
KubernetesBackendConfigto useConfigDict. - Added
ConfigDictimports.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| kubeflow/trainer/backends/localprocess/types.py | Migrates two model configs to ConfigDict. |
| kubeflow/common/types.py | Migrates one model config to ConfigDict. |
Replace all instances of Pydantic v1 class Config pattern with the Pydantic v2 equivalent using model_config = ConfigDict() to resolve PydanticDeprecatedSince20 warnings. Signed-off-by: haroon0x <haroonbmc0@gmail.com>
ad0da42 to
ce54ca6
Compare
fix: replace deprecated Pydantic v1
class ConfigwithConfigDictDescription
Replaces all instances of the deprecated Pydantic v1
class Configpattern with the Pydantic v2 equivalentmodel_config = ConfigDict(...).This resolves the
PydanticDeprecatedSince20warnings that appear when using these models with Pydantic v2.Changes
kubeflow/common/types.pyKubernetesBackendConfigclass Config→model_config = ConfigDict(arbitrary_types_allowed=True)kubeflow/trainer/backends/localprocess/types.pyLocalBackendStepkubeflow/trainer/backends/localprocess/types.pyLocalBackendJobsVerification
py_compilepydantic >= 2.10.0soConfigDictis available