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

[Feature]: Support for Pydantic v2 #1844

Open
movchan74 opened this issue Oct 16, 2024 · 3 comments
Open

[Feature]: Support for Pydantic v2 #1844

movchan74 opened this issue Oct 16, 2024 · 3 comments
Labels

Comments

@movchan74
Copy link

Problem

I'm encountering a dependency conflict due to incompatible versions of pydantic between dstack and another package my project relies on. Specifically:

  • My project (aana version 0.2.2.2) requires pydantic >=2.0.
  • dstack (version 0.18.17) depends on pydantic >=1.10.10, <2.0.0.

As a result, I'm unable to resolve dependencies when adding dstack alongside other tools in my environment that are already using Pydantic v2.

The broader AI and software community are shifting towards Pydantic v2 for its improved performance and features, and many AI projects have either fully migrated to v2 or at least added support for it. This version conflict is limiting adoption and making it challenging to integrate dstack into modern AI/ML projects that have already upgraded to Pydantic v2.

Solution

No response

Workaround

No response

Would you like to help us implement this feature by sending a PR?

No

@r4victor
Copy link
Collaborator

@movchan74, we have plans to migrate dstack to Pydantic v2. The migration is currently non-trivial since some of the dstack dependencies do not yet support Pydantic v2 (https://github.com/zmievsa/pydantic-duality for sure). We'll explore how it can be done.

You're using the dstack Python API, so you cannot install dstack into a separate venv? Is it the case?

@movchan74
Copy link
Author

It's great to hear that migrating to Pydantic v2 is on the roadmap! I understand that it’s non-trivial.

For now, this isn't a major blocker, as I can indeed set up a separate venv for dstack as you suggested. I'm still exploring how best to integrate dstack into our product, so I’ll work with this workaround in the meantime.

Thanks again for the quick response and for considering the upgrade!

@zmievsa
Copy link

zmievsa commented Oct 25, 2024

Will add support to pydantic duality for pydantic 2 this week.

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

No branches or pull requests

3 participants