Skip to content

Commit f9dd514

Browse files
committed
debugv1
1 parent 54b2491 commit f9dd514

File tree

2 files changed

+14
-7
lines changed

2 files changed

+14
-7
lines changed

rdagent/scenarios/data_science/proposal/exp_gen/prompts_v2.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -301,8 +301,7 @@ hypothesis_select:
301301
## Final Output Format in JSON Schema:
302302
{{ hypothesis_output_format }}
303303
{% endif %}
304-
305-
hypothesis_select:
304+
306305
user: |-
307306
# Scenario Description
308307
{{ scenario_desc }}

rdagent/scenarios/data_science/proposal/exp_gen/proposal.py

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -734,7 +734,7 @@ def hypothesis_select_with_llm(self,
734734
exp_feedback_list_desc: str,
735735
sota_exp_desc: str,
736736
hypothesis_candidates:dict,
737-
timer
737+
timer: RDAgentTimer
738738
):
739739

740740
# time_use_current = 0
@@ -986,11 +986,19 @@ def gen(
986986
sota_exp_desc=sota_exp_desc,
987987
hypothesis_candidates =hypothesis_dict ,
988988
timer=timer)
989+
component_map = {
990+
"Model": HypothesisComponent.Model,
991+
"Ensemble": HypothesisComponent.Ensemble,
992+
"Workflow": HypothesisComponent.Workflow,
993+
"FeatureEng": HypothesisComponent.FeatureEng,
994+
"DataLoadSpec": HypothesisComponent.DataLoadSpec,
995+
}
989996

990-
if response_dict["component"] != "Ensemble":
991-
new_hypothesis = DSHypothesis(component=hypothesis_dict[response_dict["hypothesis"]].get("component", "Model"),hypothesis=response_dict["hypothesis"])
992-
else:
993-
new_hypothesis = DSHypothesis(component=HypothesisComponent.Ensemble,hypothesis=response_dict["hypothesis"])
997+
comp_str = response_dict.get("component")
998+
hypo_str = response_dict.get("hypothesis")
999+
1000+
if comp_str in component_map and hypo_str is not None:
1001+
new_hypothesis = DSHypothesis(component=component_map[comp_str], hypothesis=hypo_str)
9941002

9951003
pickled_problem_name= None
9961004
# Step 3.5: Update knowledge base with the picked problem

0 commit comments

Comments
 (0)