From d0e3fc157367566e7754623a105dfa4b49fedf3c Mon Sep 17 00:00:00 2001 From: Xu Yang Date: Wed, 30 Apr 2025 18:53:27 +0800 Subject: [PATCH] fix new draft bugs (#840) --- .../scenarios/data_science/proposal/exp_gen/draft.py | 12 +++++------- .../proposal/exp_gen/prompts_drafting.yaml | 4 ++-- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/rdagent/scenarios/data_science/proposal/exp_gen/draft.py b/rdagent/scenarios/data_science/proposal/exp_gen/draft.py index 6179e80d..58702095 100644 --- a/rdagent/scenarios/data_science/proposal/exp_gen/draft.py +++ b/rdagent/scenarios/data_science/proposal/exp_gen/draft.py @@ -124,7 +124,6 @@ class DSDraftV2ExpGen(ExpGen): self, scenario_desc: str, scen_problems: dict, - component_desc: str, drafting_trace_desc: str, ) -> DSExperiment: scen_problems_text = "" @@ -133,7 +132,6 @@ class DSDraftV2ExpGen(ExpGen): scen_problems_text += f"- Problem Description: {problem_dict['problem']}\n\n" sys_prompt = T(".prompts_drafting:task_draft.system").r( task_spec=T(f"scenarios.data_science.share:component_spec.Pipeline").r(), - component_desc=component_desc, ) user_prompt = T(".prompts_drafting:task_draft.user").r( scenario_desc=scenario_desc, @@ -151,13 +149,13 @@ class DSDraftV2ExpGen(ExpGen): task = PipelineTask(name="Workflow", description=task_design) # we use a pesudo hypothesis here - pesudo_hypothesis = DSHypothesis( - component=task_component, - hypothesis="This is a pesudo hypothesis for drafting the first competition implementation. Your result should not be influenced by this hypothesis.", - problem_name="This is a pesudo problem name for drafting. The corresponding problem description includes several problem together.", + pseudo_hypothesis = DSHypothesis( + component="Workflow", + hypothesis="This is a pseudo hypothesis for drafting the first competition implementation. Your result should not be influenced by this hypothesis.", + problem_name="This is a pseudo problem name for drafting. The corresponding problem description includes several problem together.", problem_desc=scen_problems_text, ) - exp = DSExperiment(pending_tasks_list=[[task]], hypothesis=pesudo_hypothesis) + exp = DSExperiment(pending_tasks_list=[[task]], hypothesis=pseudo_hypothesis) return exp def gen(self, trace: DSTrace) -> DSExperiment: diff --git a/rdagent/scenarios/data_science/proposal/exp_gen/prompts_drafting.yaml b/rdagent/scenarios/data_science/proposal/exp_gen/prompts_drafting.yaml index ce9001ec..0ae68366 100644 --- a/rdagent/scenarios/data_science/proposal/exp_gen/prompts_drafting.yaml +++ b/rdagent/scenarios/data_science/proposal/exp_gen/prompts_drafting.yaml @@ -39,7 +39,7 @@ task_draft: The user is creating a Kaggle competition implementation iteratively and this is the first iteration. You will be given a competition scenario and a list of identified scenario problems from the given competition scenario. In addition, if there are any previous failed experiments, you will receive the task designs and failures. Please read them carefully to have a better understanding. - Your role is to design a very detailed task with specific steps and instructions to implement competition solution and address identifed scenario problems. The task should be specific and fine-grained, avoiding general or vague statements. + Your role is to design a very detailed task with specific steps and instructions to implement competition solution and address identified scenario problems. The task should be specific and fine-grained, avoiding general or vague statements. # Task Design ## Task Specification @@ -49,7 +49,7 @@ task_draft: Here are guidelines **YOU MUST FOLLOW** in your task design: 1. The task should be concise with several steps each only in a few sentences. 2. DO NOT write any code in the task description. - 3. DO NOT use any pharases like "for example" or "eg.," in the task description. Clearly give a decision (such as the specific method or model name) in the task description. + 3. DO NOT use any phrases like "for example" or "eg.," in the task description. Clearly give a decision (such as the specific method or model name) in the task description. 4. DO NOT use vague statements like "choose a proper model" or "optimize the pipeline". Instead, specify the exact step and task to be made. 5. Your task design should try to cover **ALL** the identified scenario problems. DO NOT include any conflicting ideas in the task design. If there are conflicting ideas due to conflicting identified problems, prioritize the most impactful or feasible option. If multiple solutions exist for a problem, select the most impactful or feasible option only. DO NOT include any conflicting ideas in the task description. 6. Carefully read and analyze the previous failed experiments if any so that no similar mistakes will be made in your task design. Remember to put the lessons you learned from previous experiments in the new task design.