-
Notifications
You must be signed in to change notification settings - Fork 34
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
Fix/flaky tools #138
Fix/flaky tools #138
Conversation
tools/optimization_by_prompting.py
Outdated
generated_template = template + instructions_format | ||
try: | ||
prompt = PromptTemplate( | ||
input_variables=["user_prompt", "additional_information"], | ||
template=generated_template, | ||
) | ||
except Exception as e: | ||
# it may happen that the generated prompt is not valid | ||
# in that case, we just skip it | ||
print(f"Failed to parse template {generated_template}: {e}") | ||
continue |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't we change something before retrying? because it looks like the value of generated_template stays same
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see your point, i guess it makes sense that in such instances we regenerate the template.
This PR fixes some flaky behaviour in the
deepmind-optimization
andprediction_request_claude
tools.