diff --git a/rdagent/components/coder/data_science/ensemble/prompts.yaml b/rdagent/components/coder/data_science/ensemble/prompts.yaml index c7258696..7e15f058 100644 --- a/rdagent/components/coder/data_science/ensemble/prompts.yaml +++ b/rdagent/components/coder/data_science/ensemble/prompts.yaml @@ -35,6 +35,8 @@ ensemble_coder: {% endfor %} {% endif %} + You should avoid using logging module to output information in your generated code, and instead use the print() function. + ## Output Format Please response the code in the following json format. Here is an example structure for the JSON output: { diff --git a/rdagent/components/coder/data_science/feature/prompts.yaml b/rdagent/components/coder/data_science/feature/prompts.yaml index 5198d23d..23d1af94 100644 --- a/rdagent/components/coder/data_science/feature/prompts.yaml +++ b/rdagent/components/coder/data_science/feature/prompts.yaml @@ -38,6 +38,7 @@ feature_coder: 3. **Additional Guidance:** - If a previous attempt exists, improve upon it without repeating mistakes. - If errors indicate a missing file, find a way to download it or implement an alternative solution. + - You should avoid using logging module to output information in your generated code, and instead use the print() function. ## Output Format Please response the code in the following json format. Here is an example structure for the JSON output: diff --git a/rdagent/components/coder/data_science/model/eval_tests/model_test.txt b/rdagent/components/coder/data_science/model/eval_tests/model_test.txt index 2a1f8a7f..e2a8361c 100644 --- a/rdagent/components/coder/data_science/model/eval_tests/model_test.txt +++ b/rdagent/components/coder/data_science/model/eval_tests/model_test.txt @@ -8,7 +8,7 @@ from sklearn.model_selection import train_test_split def log_execution_results(start_time, val_pred, test_pred, hypers, execution_label): """Log the results of a single model execution.""" - feedback_str = f"{execution_label} successful.\n" + feedback_str = f"{execution_label} end.\n" feedback_str += f"Validation predictions shape: {val_pred.shape if val_pred is not None else 'None'}\n" feedback_str += f"Test predictions shape: {test_pred.shape if test_pred is not None else 'None'}\n" feedback_str += f"Hyperparameters: {hypers if hypers is not None else 'None'}\n" diff --git a/rdagent/components/coder/data_science/model/prompts.yaml b/rdagent/components/coder/data_science/model/prompts.yaml index 47b5306c..7ed96275 100644 --- a/rdagent/components/coder/data_science/model/prompts.yaml +++ b/rdagent/components/coder/data_science/model/prompts.yaml @@ -35,6 +35,7 @@ model_coder: {{ data_loader_code }} --------- Feature Engineering Code --------- {{ feature_code }} + 2. You should avoid using logging module to output information in your generated code, and instead use the print() function. ## Output Format {% if out_spec %} 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 e2fc0ed9..1513b769 100644 --- a/rdagent/components/coder/data_science/raw_data_loader/prompts.yaml +++ b/rdagent/components/coder/data_science/raw_data_loader/prompts.yaml @@ -336,6 +336,7 @@ data_loader_coder: ## Guidelines 1. Ensure that the dataset is loaded strictly from `/kaggle/input/`, following the exact folder structure described in the **Data Folder Description**, and do not attempt to load data from the current directory (`./`). + 2. You should avoid using logging module to output information in your generated code, and instead use the print() function. ## Output Format Please response the code in the following json format. Here is an example structure for the JSON output: diff --git a/rdagent/components/coder/data_science/workflow/prompts.yaml b/rdagent/components/coder/data_science/workflow/prompts.yaml index a292ed63..ca6ab3ce 100644 --- a/rdagent/components/coder/data_science/workflow/prompts.yaml +++ b/rdagent/components/coder/data_science/workflow/prompts.yaml @@ -39,6 +39,7 @@ workflow_coder: 2. Your task is only to integrate the existing processes of load_data, feature, model, and ensemble into a complete workflow. Do not edit or modify the existing Python files. The final step should output the predictions in the required format. 3. The user may provide specific code organization rules and instructions. Ensure that the integration follows the given framework and structure. 4. After predicting the output, print the shape and other information of the output to stdout to help the evaluator assess the code. + 5. You should avoid using logging module to output information in your generated code, and instead use the print() function. ## Output Format Please response the code in the following json format. Here is an example structure for the JSON output: