Skip to content

Conversation

@chenmoneygithub
Copy link
Collaborator

resolve #1644

We don't need a standalone signature attribute in TypePredictor, because it's never actually used. We keep the self.signature to be valid for backward compatibility

@chenmoneygithub chenmoneygithub mentioned this pull request Oct 19, 2024
@chenmoneygithub chenmoneygithub requested a review from okhat October 19, 2024 23:58
@okhat okhat merged commit ef83201 into stanfordnlp:main Oct 20, 2024
4 checks passed
def signature(self) -> dspy.Signature:
return self.predictor.signature

@signature.setter
Copy link

@fireking77 fireking77 Oct 20, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you want to ensure that this value is not set outside the object initialization (bootstrapping), I would remove the setter to prevent anyone from using it to set the value. Of course, the tests should still pass.

In summary, if you don't plan to use it, the setter is unnecessary.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unfortunately we have to keep self.signature being readable and settable, otherwise it could break people's existing code.

@chenmoneygithub chenmoneygithub deleted the fix-saving-geez branch December 27, 2024 22:03
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.

Model Load

3 participants