mirror of
https://github.com/NicolasBohn/NexQuant.git
synced 2026-07-27 23:47:46 +00:00
fix retry when hypothesis gen (#796)
This commit is contained in:
@@ -201,9 +201,7 @@ output_format:
|
||||
{
|
||||
"problem name 1 (Should be exactly same as the problem name provided)": {
|
||||
"reason": "Provide a clear, logical progression from problem identification to hypothesis formulation, grounded in evidence (e.g., trace history, domain principles, or competition constraints). Refer to the Hypothesis Guidelines for better understanding. Reason should be short with no more than two sentences.",
|
||||
{% if not pipeline %}"component": "The component name that the hypothesis focus on. Must be one of ('DataLoadSpec', 'FeatureEng', 'Model', 'Ensemble', 'Workflow').",
|
||||
{% else %}"component": "The component name that the hypothesis mainly focus on. Must be one of ('DataLoadSpec', 'FeatureEng', 'Model', 'Ensemble', 'Workflow').",
|
||||
{% endif %}
|
||||
"component": "The component name that the hypothesis {% if pipeline %}mainly {% endif %}focuses on. Must be one of ('DataLoadSpec', 'FeatureEng', 'Model', 'Ensemble', 'Workflow').",
|
||||
"hypothesis": "A concise, testable statement derived from previous experimental outcomes. Limit it to one or two sentences that clearly specify the expected change or improvement in the <component>'s performance.",
|
||||
"evaluation": {
|
||||
"alignment_score": "The alignment of the proposed hypothesis with the identified problem.",
|
||||
|
||||
@@ -259,13 +259,7 @@ class DSProposalV2ExpGen(ExpGen):
|
||||
)
|
||||
return json.loads(response)
|
||||
|
||||
def _append_retry(args: tuple, kwargs: dict) -> tuple[tuple, dict]:
|
||||
# Only modify the user_prompt on retries (i > 0)
|
||||
user_prompt = args[0]
|
||||
user_prompt += "\n\nretrying..."
|
||||
return (user_prompt,), kwargs
|
||||
|
||||
@wait_retry(retry_n=5, transform_args_fn=_append_retry)
|
||||
@wait_retry(retry_n=5)
|
||||
def hypothesis_gen(
|
||||
self,
|
||||
component_desc: str,
|
||||
|
||||
Reference in New Issue
Block a user