fix: adjust ds_trace lookup and add stderr redirect to mlebench command (#853)

* fix: adjust ds_trace lookup and add stderr redirect to mlebench command

* style: reformat SOTA experiment lookup in ds_trace.py

* feat: add DS_RD_SETTING pipeline to MergeExpGen success message
This commit is contained in:
you-n-g
2025-05-08 02:40:49 +08:00
committed by GitHub
parent 45b260ba37
commit e1d08cfe73
3 changed files with 9 additions and 2 deletions
+5 -1
View File
@@ -397,7 +397,11 @@ def main_win(loop_id, llm_data=None):
loop_data["running"],
loop_data.get("mle_score", "no submission to score"),
llm_data=llm_data["running"] if llm_data else None,
sota_exp=state.data[loop_id - 1].get("record", {}).get("SOTA experiment", None) if loop_id >= 1 else None,
sota_exp=(
state.data[loop_id - 1].get("record", {}).get("SOTA experiment", None)
if (loop_id - 1) in state.data
else None
),
)
if "feedback" in loop_data:
feedback_win(loop_data["feedback"], llm_data.get("feedback", None) if llm_data else None)
@@ -1,5 +1,6 @@
"""Merge the version in different traces"""
from rdagent.app.data_science.conf import DS_RD_SETTING
from rdagent.components.coder.data_science.pipeline.exp import PipelineTask
from rdagent.core.proposal import ExpGen
from rdagent.scenarios.data_science.experiment.experiment import DSExperiment
@@ -46,6 +47,7 @@ class MergeExpGen(ExpGen):
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",
pipeline=DS_RD_SETTING.coder_on_whole_pipeline,
)
else:
exp_to_merge_fb_desc = T("scenarios.data_science.share:describe.feedback").r(
+2 -1
View File
@@ -103,7 +103,8 @@ class MLETestEval(TestEvalBase):
def eval(self, competition: str, workspace: FBWorkspace) -> str:
workspace.execute(
env=self.env,
entry=f"mlebench grade-sample submission.csv {competition} --data-dir /mle/data | tee mle_score.txt",
entry=f"mlebench grade-sample submission.csv {competition} --data-dir /mle/data 2>&1 | tee mle_score.txt",
# NOTE: mlebench does not give output to stdout. so 2>&1 is very necessary !!!!!!
)
workspace.execute(env=self.env, entry="chmod 777 mle_score.txt")
return (workspace.workspace_path / "mle_score.txt").read_text()