Skip to content

Conversation

@tkellogg
Copy link
Contributor

@tkellogg tkellogg commented Oct 1, 2024

This adds a num_retries option to
signature_opt_typed.optimize_signature(). This is passed through to both TypedChainOfThought and TypedPredictor.

Why? Because I was stuck. I kept getting this error message:

Value error, Never propose a signature already in the list above.: proposed_signature (error type: value_error)

I can get around this error by raising the model's temperature as well as setting this to num_retries=10.

Note: I see comments about not supporting temperature because it breaks parsing. While that's true, having temp be zero also leads to getting completely stuck because there's no simple solution for common errors like this. With high enough temperature and enough retries, I should be able to unstick myself from any situation.

This adds a `num_retries` option to
`signature_opt_typed.optimize_signature()`. This is passed through to
both `TypedChainOfThought` and `TypedPredictor`.

**Why?** Because I was stuck. I kept getting this error message:

> Value error, Never propose a signature already in the list above.: proposed_signature (error type: value_error)

I can get around this error by raising the model's temperature as well
as setting this to `num_retries=10`.

Note: I see comments about not supporting temperature because it breaks
parsing. While that's true, having temp be zero also leads to getting
completely stuck because there's no simple solution for common errors
like this. With high enough temperature and enough retries, I should be
able to unstick myself from any situation.
@okhat okhat requested a review from thomasahle October 1, 2024 13:38
@okhat
Copy link
Collaborator

okhat commented Oct 1, 2024

Thank you @tkellogg ! This looks like a very useful addition to me but I'll defer to @thomasahle if he has a chance to check, since he built all the typed pieces. Will merge in 2 days otherwise.

@okhat
Copy link
Collaborator

okhat commented Oct 1, 2024

and +1 to "Why? Because I was stuck." We need more such PRs.

This adds a `num_retries` option to
`signature_opt_typed.optimize_signature()`. This is passed through to
both `TypedChainOfThought` and `TypedPredictor`.

**Why?** Because I was stuck. I kept getting this error message:

> Value error, Never propose a signature already in the list above.: proposed_signature (error type: value_error)

I can get around this error by raising the model's temperature as well
as setting this to `num_retries=10`.

Note: I see comments about not supporting temperature because it breaks
parsing. While that's true, having temp be zero also leads to getting
completely stuck because there's no simple solution for common errors
like this. With high enough temperature and enough retries, I should be
able to unstick myself from any situation.
@okhat okhat merged commit 388c84f into stanfordnlp:main Oct 2, 2024
@tkellogg tkellogg deleted the sig-opt-retries branch October 2, 2024 22:26
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