From 3b7bafae127f661f2ff35b1728506770ed4ef448 Mon Sep 17 00:00:00 2001 From: Tim Date: Wed, 7 May 2025 17:24:50 +0800 Subject: [PATCH] chore: dump test data (#850) * debug path for model dump * update prompt --- rdagent/components/coder/data_science/share/eval.py | 6 +----- rdagent/components/coder/data_science/share/prompts.yaml | 6 ++++-- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/rdagent/components/coder/data_science/share/eval.py b/rdagent/components/coder/data_science/share/eval.py index 3de1e2fd..3d47f352 100644 --- a/rdagent/components/coder/data_science/share/eval.py +++ b/rdagent/components/coder/data_science/share/eval.py @@ -44,11 +44,7 @@ class ModelDumpEvaluator(CoSTEEREvaluator): final_decision=False, ) env = get_ds_env() - env.conf.extra_volumes = { - f"{DS_RD_SETTING.local_data_path}/{'sample/' if self.data_type == 'sample' else ''}{self.scen.competition}": T( - "scenarios.data_science.share:scen.input_path" - ).r() - } + env.conf.extra_volumes = {self.scen.debug_path: T("scenarios.data_science.share:scen.input_path").r()} # 2) check the result and stdout after reruning the model. diff --git a/rdagent/components/coder/data_science/share/prompts.yaml b/rdagent/components/coder/data_science/share/prompts.yaml index aea652f7..3bf09147 100644 --- a/rdagent/components/coder/data_science/share/prompts.yaml +++ b/rdagent/components/coder/data_science/share/prompts.yaml @@ -1,8 +1,9 @@ dump_model_coder: guideline: |- - Please dump the model in a "models/" subfolder in the first running, and the script rerun performs inference without needing to retrain the model. + Please dump the model in a "models/" subfolder in the first running, and the script rerun performs inference without needing to retrain the model when running the code again. If there are parameters generated from the training data that might be needed for inference on test data, please save them in the "models/" subfolder as well. - Make sure that the required files, like submission.csv and scores.csv, are created even if you bypass the model training step by loading the saved model file directly. + If no test set is provided, reserve a portion of the data as your test set and save the generated test files in the models/ subfolder for use in submission and inference. + Make sure that the required files, like submission.csv and scores.csv, are created without model training step through loading the saved model and test data file directly. dump_model_eval: system: |- @@ -18,6 +19,7 @@ dump_model_eval: Focus on these aspects: - Check if the code saves the model in the "models/" subfolder. + - Check if the code saves the test data in the "models/" subfolder when there is no test data specified. - Ensure that when the code is rerun, it skips the training process and loads the model from the "models/" subfolder for direct inference. - Verify that there is no training activity in the output. - Ensure that even if you skip the model training by loading saved models, the files like scores.csv and submission.csv are still correctly created.