From b0672baa9d9316ee0db777b3a3277f4a641bc561 Mon Sep 17 00:00:00 2001 From: WinstonLiyt <104308117+WinstonLiyt@users.noreply.github.com> Date: Tue, 24 Sep 2024 17:23:18 +0800 Subject: [PATCH] fix: fix a bug in model tuning feedback (#316) * fix a bug * fix two bugs --- rdagent/scenarios/kaggle/developer/feedback.py | 2 +- rdagent/scenarios/kaggle/prompts.yaml | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/rdagent/scenarios/kaggle/developer/feedback.py b/rdagent/scenarios/kaggle/developer/feedback.py index b85dc91e..ec89e258 100644 --- a/rdagent/scenarios/kaggle/developer/feedback.py +++ b/rdagent/scenarios/kaggle/developer/feedback.py @@ -114,7 +114,7 @@ class KGHypothesisExperiment2Feedback(HypothesisExperiment2Feedback): # Prepare render dictionary render_dict = { "context": self.scen.get_scenario_all_desc(), - "last_hypothesis": trace.hist[-1][0].hypothesis if trace.hist else None, + "last_hypothesis": trace.hist[-1][0] if trace.hist else None, "last_task_and_code": last_task_and_code, "last_result": trace.hist[-1][1].result if trace.hist else None, "hypothesis": hypothesis, diff --git a/rdagent/scenarios/kaggle/prompts.yaml b/rdagent/scenarios/kaggle/prompts.yaml index 9494b984..e2580e4c 100644 --- a/rdagent/scenarios/kaggle/prompts.yaml +++ b/rdagent/scenarios/kaggle/prompts.yaml @@ -110,7 +110,7 @@ model_experiment_output_format: |- } Usually, a larger model works better than a smaller one. Hence, the parameters should be larger. -model_feedback_generation: +model_tuning_feedback_generation: system: |- You are a professional result analysis assistant. You will receive a result and a hypothesis. Your task is to provide feedback on how well the result supports or refutes the hypothesis by judging from the observation of performance increase or decrease. @@ -149,8 +149,7 @@ model_feedback_generation: {% if last_hypothesis %} Last Round Information: Hypothesis: {{last_hypothesis.hypothesis}} - Task: {{last_task}} - Code Implemented: {{last_code}} + Last Task and Code: {{last_task_and_code}} Result: {{last_result}} {% else %} This is the first round. No previous information available. As long as the performance is not too negative (eg.ICIR is greater than 0), treat it as successful. Do not set the threshold too high.