@@ -734,7 +734,7 @@ def hypothesis_select_with_llm(self,
734
734
exp_feedback_list_desc : str ,
735
735
sota_exp_desc : str ,
736
736
hypothesis_candidates :dict ,
737
- timer
737
+ timer : RDAgentTimer
738
738
):
739
739
740
740
# time_use_current = 0
@@ -986,11 +986,19 @@ def gen(
986
986
sota_exp_desc = sota_exp_desc ,
987
987
hypothesis_candidates = hypothesis_dict ,
988
988
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
+ }
989
996
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 )
994
1002
995
1003
pickled_problem_name = None
996
1004
# Step 3.5: Update knowledge base with the picked problem
0 commit comments