diff --git a/rdagent/scenarios/data_science/proposal/exp_gen/merge.py b/rdagent/scenarios/data_science/proposal/exp_gen/merge.py index 723de41e..1e7ca4bf 100644 --- a/rdagent/scenarios/data_science/proposal/exp_gen/merge.py +++ b/rdagent/scenarios/data_science/proposal/exp_gen/merge.py @@ -37,10 +37,15 @@ class MergeExpGen(ExpGen): heading="A solution that to be merged into previous best solution", ) - success_fb_list = trace.experiment_and_feedback_list_after_init(return_type="sota", selection=(leaves[1],)) + success_fb_list = trace.experiment_and_feedback_list_after_init( + return_type="sota", search_type="ancestors", selection=(leaves[1],) + ) if len(success_fb_list) > 0: exp_to_merge_fb_desc = T("scenarios.data_science.share:describe.trace").r( - exp_and_feedback_list=success_fb_list, type="success", heading="Successful iterations:" + exp_and_feedback_list=success_fb_list, + type="success", + heading="Successful iterations:", + success_trial_desc="These trials are the steps or changes that led to the success of the solution to be merged", ) else: exp_to_merge_fb_desc = T("scenarios.data_science.share:describe.feedback").r( diff --git a/rdagent/scenarios/data_science/share.yaml b/rdagent/scenarios/data_science/share.yaml index 1ec3b3e2..dac88bae 100644 --- a/rdagent/scenarios/data_science/share.yaml +++ b/rdagent/scenarios/data_science/share.yaml @@ -31,7 +31,6 @@ describe: # some template to describe some object feedback: |- {% if exp_and_feedback and exp_and_feedback|length > 1 %} ## {{heading | default('Previous trial and feedback')}} - Before current trial, a previous recent trial is listed below. {% if exp_and_feedback[0].hypothesis %} the experiment is designed based on hypothesis: {{ exp_and_feedback[0].hypothesis }} {% endif %} @@ -51,16 +50,9 @@ describe: # some template to describe some object ## {{ heading | default('Trace of all trials') }} {% endif %} - Before current trial, several + Before current trial, several {% if type == "success" %}successful{% elif type == "failure" %}failed{% else %}successful or failed{% endif %} trials are listed below. {% if type == "success" %} - successful - {% elif type == "failure" %} - failed - {% else %} - successful or failed - {% endif %} trials are listed below. - {% if type == "success" %} - The current SOTA method is the combination of the best solutions of these trials. + {{success_trial_desc | default('The current SOTA method is the combination of the best solutions of these trials.')}} {% endif %} The trace order is from the earliest to the latest. Please focus more on the later trials.