Skip to content

Conversation

@mikeedjones
Copy link

@mikeedjones mikeedjones commented Nov 25, 2024

Pydantic 2.10 includes a change to model_fields turning it into a property. Dspy's Signature.replace method cannot replace that property. This PR updates the replacement to also target __pydantic_fields__.

  • Reorganized imports in dspy/signatures/signature.py for better readability and maintainability.
  • Simplified the OldSignature class definition by removing the unnecessary Signature base class.
  • Updated requirements-dev.txt to include dependency datamodel-code-generator==0.26.3 and sorted reqs

@mikeedjones mikeedjones mentioned this pull request Nov 25, 2024
@okhat
Copy link
Collaborator

okhat commented Nov 25, 2024

Thank you so much @mikeedjones !

@okhat okhat merged commit ff6f5a8 into stanfordnlp:main Nov 25, 2024
4 checks passed
isaacbmiller pushed a commit that referenced this pull request Dec 11, 2024
* feat(dspy): add datamodel-code-generator to dev reqs

* fix(dspy): fix signature replace for pydantic v2.10

* fix(dspy): fix signature replace for pydantic v2.10
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.

2 participants