still assign five component to pipeline (#780)

This commit is contained in:
Xu Yang
2025-04-10 04:30:32 -06:00
committed by GitHub
parent f06e6986c8
commit 959f2fa076
2 changed files with 14 additions and 5 deletions
@@ -74,7 +74,9 @@ hypothesis_gen:
Each hypothesis should focus on one of the following 5 components of an implementation:
{{ component_desc }}
{% else %}
Each hypothesis should focus on the whole pipeline.
Although we don't require each hypothesis to focus on single specific component, you should still respond the main component that the hypothesis focus on.
Candidate components are:
{{ component_desc }}
{% endif %}
## Hypothesis Guidelines
@@ -197,7 +199,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 focus on. Must be 'Pipeline'.",
{% else %}"component": "The component name that the hypothesis mainly focus on. Must be one of ('DataLoadSpec', 'FeatureEng', 'Model', 'Ensemble', 'Workflow').",
{% endif %}
"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": {
@@ -343,8 +343,13 @@ class DSProposalV2ExpGen(ExpGen):
hypothesis: DSHypothesis,
pipeline: bool,
) -> DSExperiment:
component_info = COMPONENT_TASK_MAPPING.get(hypothesis.component)
if not pipeline and DS_RD_SETTING.spec_enabled and sota_exp is not None:
if pipeline:
component_info = COMPONENT_TASK_MAPPING["Pipeline"]
else:
component_info = COMPONENT_TASK_MAPPING.get(hypothesis.component)
if pipeline:
task_spec = T(f"scenarios.data_science.share:component_spec.Pipeline").r()
elif DS_RD_SETTING.spec_enabled and sota_exp is not None:
task_spec = sota_exp.experiment_workspace.file_dict[component_info["spec_file"]]
else:
task_spec = T(f"scenarios.data_science.share:component_spec.{hypothesis.component}").r()
@@ -366,7 +371,9 @@ class DSProposalV2ExpGen(ExpGen):
)
task_dict = json.loads(response)
task_design = task_dict.get("task_design", {})
task_name = task_design["model_name"] if hypothesis.component == "Model" else hypothesis.component
task_name = (
task_design["model_name"] if (hypothesis.component == "Model" and not pipeline) else hypothesis.component
)
description = (
task_design
if isinstance(task_design, str)