From d759ca95e714a7a1476839a2a04bb652c0fbb863 Mon Sep 17 00:00:00 2001 From: amstrongzyf <201840057@smail.nju.edu.cn> Date: Thu, 28 Aug 2025 14:36:23 +0800 Subject: [PATCH] fix: fix bug for hypo_select_with_llm when not support response_schema (#1208) --- .../data_science/proposal/exp_gen/proposal.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/rdagent/scenarios/data_science/proposal/exp_gen/proposal.py b/rdagent/scenarios/data_science/proposal/exp_gen/proposal.py index c6961fa0..dbd13a71 100644 --- a/rdagent/scenarios/data_science/proposal/exp_gen/proposal.py +++ b/rdagent/scenarios/data_science/proposal/exp_gen/proposal.py @@ -1140,7 +1140,11 @@ class DSProposalV2ExpGen(ExpGen): merge_hours=DS_RD_SETTING.merge_hours, # extra_exp_feedback_list_desc=extra_exp_feedback_list_str, selected_extra_hypo_l=selected_extra_hypo_l, - hypothesis_output_format=T(".prompts_v2:output_format.hypothesis_select_format").r(), + hypothesis_output_format=( + T(".prompts_v2:output_format.hypothesis_select_format").r() + if not self.supports_response_schema + else None + ), sota_flag=sota_flag, current_sota_score=current_sota_score, ratio_merge_or_ensemble=ratio_merge_or_ensemble, @@ -1157,9 +1161,7 @@ class DSProposalV2ExpGen(ExpGen): user_prompt=user_prompt, system_prompt=sys_prompt, response_format=HypothesisSimple if self.supports_response_schema else {"type": "json_object"}, - json_target_type=( - Dict[str, Dict[str, str | Dict[str, str | int]]] if not self.supports_response_schema else None - ), + json_target_type=(Dict[str, str] if not self.supports_response_schema else None), ) response_dict = json.loads(response)