From d8b5a4cf65e064b7a3e990764c667c968b94a838 Mon Sep 17 00:00:00 2001 From: yuanteli <1957922024@qq.com> Date: Mon, 30 Dec 2024 07:02:07 +0000 Subject: [PATCH] fix a bug in ensemble module --- .../components/coder/data_science/raw_data_loader/prompts.yaml | 2 +- rdagent/components/coder/data_science/workflow/prompts.yaml | 2 +- rdagent/components/coder/data_science/workflow/test.py | 2 +- .../kaggle/tpl_ex/aerial-cactus-identification/main.py | 2 +- .../kaggle/tpl_ex/aerial-cactus-identification/spec/workflow.md | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/rdagent/components/coder/data_science/raw_data_loader/prompts.yaml b/rdagent/components/coder/data_science/raw_data_loader/prompts.yaml index 7ab18e1d..0f4a47ed 100644 --- a/rdagent/components/coder/data_science/raw_data_loader/prompts.yaml +++ b/rdagent/components/coder/data_science/raw_data_loader/prompts.yaml @@ -227,7 +227,7 @@ spec: - Data loading (`load_data.py`). - Feature engineering (`feat*.py`). - Model workflow for training and testing (`model*.py`). - - Ensemble and decision-making (`ens.py`). + - Ensemble and decision-making (`ensemble.py`). - Treat each component as a modular and callable Python function. 2. Dataset Splitting diff --git a/rdagent/components/coder/data_science/workflow/prompts.yaml b/rdagent/components/coder/data_science/workflow/prompts.yaml index c0214d6a..403cea9b 100644 --- a/rdagent/components/coder/data_science/workflow/prompts.yaml +++ b/rdagent/components/coder/data_science/workflow/prompts.yaml @@ -57,7 +57,7 @@ workflow_coder: {{ model_code }} ---------ensemble code--------- - file: ens.py + file: ensemble.py {{ ensemble_code }} {% if latest_code %} diff --git a/rdagent/components/coder/data_science/workflow/test.py b/rdagent/components/coder/data_science/workflow/test.py index f2c2dcad..210ca164 100644 --- a/rdagent/components/coder/data_science/workflow/test.py +++ b/rdagent/components/coder/data_science/workflow/test.py @@ -26,7 +26,7 @@ def develop_one_competition(competition: str): ) tpl_ex_path = Path(__file__).resolve() / Path("rdagent/scenarios/kaggle/tpl_ex").resolve() / competition - injected_file_names = ["spec/workflow.md", "load_data.py", "feat01.py", "model01.py", "ens.py", "main.py"] + injected_file_names = ["spec/workflow.md", "load_data.py", "feat01.py", "model01.py", "ensemble.py", "main.py"] workflowexp = FBWorkspace() for file_name in injected_file_names: diff --git a/rdagent/scenarios/kaggle/tpl_ex/aerial-cactus-identification/main.py b/rdagent/scenarios/kaggle/tpl_ex/aerial-cactus-identification/main.py index 3d45b0ec..3e060628 100644 --- a/rdagent/scenarios/kaggle/tpl_ex/aerial-cactus-identification/main.py +++ b/rdagent/scenarios/kaggle/tpl_ex/aerial-cactus-identification/main.py @@ -25,7 +25,7 @@ # Ensemble -from ens import ens_and_decision +from ensemble import ens_and_decision pred_binary = ens_and_decision([test_pred], [val_pred], validation_labels) diff --git a/rdagent/scenarios/kaggle/tpl_ex/aerial-cactus-identification/spec/workflow.md b/rdagent/scenarios/kaggle/tpl_ex/aerial-cactus-identification/spec/workflow.md index 10ee6de0..7ea16f69 100644 --- a/rdagent/scenarios/kaggle/tpl_ex/aerial-cactus-identification/spec/workflow.md +++ b/rdagent/scenarios/kaggle/tpl_ex/aerial-cactus-identification/spec/workflow.md @@ -9,7 +9,7 @@ The project should be organized into the following components: 1. **Data Loading** (`load_data.py`): A module responsible for loading and preprocessing raw data. 2. **Feature Engineering**(`feat*.py`): A module for transforming raw data into features suitable for model training. 3. **Model Workflow**(`model*.py`): A module that manages the training, validation, and testing of machine learning models. -4. **Ensemble and Decision Making**(`ens.py`): A module for combining predictions from multiple models and making final decisions. +4. **Ensemble and Decision Making**(`ensemble.py`): A module for combining predictions from multiple models and making final decisions. 5. **Workflow**(`main.py`): A script to put the above component together to get the final submission(`submission.csv`) ## Submission