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

max_backtracking_attempts value #1138

Closed
Momilijaz96 opened this issue Jun 12, 2024 · 1 comment
Closed

max_backtracking_attempts value #1138

Momilijaz96 opened this issue Jun 12, 2024 · 1 comment

Comments

@Momilijaz96
Copy link

I am using dspy.Suggest and want to set a custom value for max_backtracking_attempts

@tom-doerr
Copy link
Contributor

You should be able to do that by creating your own backtrack_handler setting the max_backtracks value:

def backtrack_handler(func, bypass_suggest=True, max_backtracks=2):

You then need to set your custom backtrack handler as the assertion_handler when calling assert_transform_module:

assertion_handler=default_assertion_handler,

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

No branches or pull requests

3 participants