mirror of
https://github.com/NicolasBohn/NexQuant.git
synced 2026-07-29 00:17:44 +00:00
fix: fix a bug in proposal (add last loop's exception to last task desc) (#596)
* fix a bug in proposal (add last loop's exception to last task desc) * fix
This commit is contained in:
@@ -198,15 +198,7 @@ class DSExpGen(ExpGen):
|
||||
if len(trace.hist) > 0 and trace.hist[-1] is not last_successful_exp
|
||||
else None
|
||||
)
|
||||
resp_dict = self._init_task_gen(
|
||||
targets=component,
|
||||
scenario_desc=scenario_desc,
|
||||
spec=last_successful_exp.experiment_workspace.file_dict[spec_file] if spec_file else None,
|
||||
task_output_format=T(f".prompts:output_format.{component_prompt_key or component.lower()}").r(),
|
||||
former_task=former_task_desc,
|
||||
)
|
||||
|
||||
# Create task instance
|
||||
exp_and_feedback = trace.hist[-1] if len(trace.hist) > 0 else None
|
||||
if (
|
||||
exp_and_feedback
|
||||
@@ -217,10 +209,15 @@ class DSExpGen(ExpGen):
|
||||
and component == "Model"
|
||||
)
|
||||
): # Assumption: when completing missing component, using component name as task name
|
||||
resp_dict["description"] = (
|
||||
str(resp_dict.get("description", ""))
|
||||
+ f"\n\nYou have tried to implement the same component and got the following exception: \n{exp_and_feedback[1].exception}\n Please try different methods to avoid the same errors and results in an infinite loop"
|
||||
)
|
||||
former_task_desc += f"\n\nYou have tried to implement the same component and got the following exception: \n{exp_and_feedback[1].exception}\n Please try different methods to avoid the same errors and results in an infinite loop"
|
||||
|
||||
resp_dict = self._init_task_gen(
|
||||
targets=component,
|
||||
scenario_desc=scenario_desc,
|
||||
spec=last_successful_exp.experiment_workspace.file_dict[spec_file] if spec_file else None,
|
||||
task_output_format=T(f".prompts:output_format.{component_prompt_key or component.lower()}").r(),
|
||||
former_task=former_task_desc,
|
||||
)
|
||||
|
||||
task = task_cls(
|
||||
name=component if component != "Model" else resp_dict.pop("model_name"),
|
||||
|
||||
@@ -342,7 +342,6 @@ output_format:
|
||||
},
|
||||
},
|
||||
}
|
||||
Usually, a larger model works better than a smaller one. Hence, the parameters should be larger.
|
||||
ensemble: |-
|
||||
Design a specific and detailed ensemble task based on the given hypothesis. The output should be detailed enough to directly implement the corresponding code.
|
||||
The output should follow JSON format. The schema is as follows:
|
||||
|
||||
@@ -173,7 +173,6 @@ model_experiment_output_format: |-
|
||||
"model_type": "Please select only **one** model type from the following four options: XGBoost, RandomForest, LightGBM, or NN. The selected model must be unique and used as the **primary model**. You may choose an auxiliary model for support or optimization on specific tasks if necessary, but the primary model must come from the provided options."
|
||||
|
||||
}
|
||||
Usually, a larger model works better than a smaller one. Hence, the parameters should be larger.
|
||||
|
||||
kg_feedback_generation_user: |-
|
||||
We are in a process of finding and validating hypotheses to build a powerful model. Each round aims to confirm or reject hypotheses based on results.
|
||||
|
||||
Reference in New Issue
Block a user