-
Notifications
You must be signed in to change notification settings - Fork 176
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
Introduce pydantic_v1 compatibility module for pydantic>=2.0.0 support #240
Introduce pydantic_v1 compatibility module for pydantic>=2.0.0 support #240
Conversation
Instead of upgrading deepspeed to pydantic v2, deepspeed can use pydantic v2's alias for the v1 API in order to unpin pydantic and allow greater flexibility for deepspeed users
@loadams LMK what you think of this solution. I like it because it avoids the pain of upgrading and immediately unblocks people who want to use |
@microsoft-github-policy-service agree company="Protopia AI" |
Can these workflows be retried? I added the license header, although |
@loadams 🙏 not sure if you were notified of my above comment so just tagging you |
@loadams it looks like everything is passing. Can you let me know the result of your internal discussion as to whether this PR and microsoft/DeepSpeed#4407 will be acceptable? Based on what we've discussed, I think the next steps would be to:
|
It seems like |
@ringohoffman - this seems reasonable, we will want feedback from @mrwyattii as well. but your next steps are correct. |
@mrwyattii do you have a timeline for reviewing this? 🙏 This is blocking my team from using DeepSpeed due to our dependency on pydantic>=2.0.0. |
@ringohoffman thank you for the contribution. I'm sorry that this is a blocker for your team. I will prioritize getting this reviewed (along with the accompanying DeepSpeed PR you shared). |
Alternate to #213
Related: microsoft/DeepSpeed#4407
Inspired by LangChain's solution: https://github.com/langchain-ai/langchain/blob/64385c4eae4a4b8c27e73b09018f344f0b791f31/libs/langchain/langchain/pydantic_v1/__init__.py#L14-L17
mii
can unpinpydantic
, but instead of using the newpydantic
v2 features,mii
can use v2's alias for the v1 API in order to allow greater flexibility formii
users by allowing them to use eitherpydantic
v1 or v2