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

Bugfix/signature replace and pydantic 2.10 #1855

Merged

Conversation

mikeedjones
Copy link
Contributor

@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
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