Skip to content

Conversation

@ringohoffman
Copy link

@ringohoffman ringohoffman commented Sep 27, 2023

Alternate to #3902
Related: deepspeedai/DeepSpeed-MII#240

Inspired by LangChain's solution: https://github.com/langchain-ai/langchain/blob/64385c4eae4a4b8c27e73b09018f344f0b791f31/libs/langchain/langchain/pydantic_v1/__init__.py#L14-L17

deepspeed can unpin pydantic, but instead of using the new pydantic v2 features, deepspeed can use v2's alias for the v1 API in order to allow greater flexibility for deepspeed users by allowing them to use either pydantic v1 or v2

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
@ringohoffman
Copy link
Author

@microsoft-github-policy-service agree company="Protopia AI"

@mrwyattii mrwyattii marked this pull request as ready for review October 6, 2023 17:10
@mrwyattii mrwyattii merged commit 604d701 into deepspeedai:master Oct 9, 2023
@ringohoffman ringohoffman deleted the pydantic-compatibility-module branch October 9, 2023 19:03
mauryaavinash95 pushed a commit to mauryaavinash95/DeepSpeed that referenced this pull request Oct 9, 2023
deepspeedai#4407)

* Introduce pydantic_v1 compatibility module for pydantic>=2.0.0 support
@ringohoffman
Copy link
Author

@mrwyattii thank you so much for reviewing and merging! Can you release a patch including this PR?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants