From f200320b3f0fa3eae5f5f77e795cc2f2a739b1a2 Mon Sep 17 00:00:00 2001 From: Yuante Li <104308117+WinstonLiyt@users.noreply.github.com> Date: Tue, 18 Feb 2025 22:24:11 +0800 Subject: [PATCH] add a check for the name of ensemble's score in scores.csv (#614) --- .../data_science/ensemble/eval_tests/ensemble_test.txt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/rdagent/components/coder/data_science/ensemble/eval_tests/ensemble_test.txt b/rdagent/components/coder/data_science/ensemble/eval_tests/ensemble_test.txt index ce38c2a6..1d70116e 100644 --- a/rdagent/components/coder/data_science/ensemble/eval_tests/ensemble_test.txt +++ b/rdagent/components/coder/data_science/ensemble/eval_tests/ensemble_test.txt @@ -93,8 +93,13 @@ model_set_in_scores = set(score_df.index) for model in {{model_names}}: if model not in model_set_in_scores: print(f"\nModel {model} is not evaluated in the scores.csv.") -print("Please check the format of the scores dataframe and ignore the magnitude of its values:") + +print("Please check the format of the scores dataframe:") print(score_df) +if "ensemble" not in model_set_in_scores: + print("\nError: Ensemble results are missing or incorrectly saved in `scores.csv`. " + "Ensure that the ensemble's performance is recorded as 'ensemble' in the file.") + print("Ensemble test end.") print(f"Final prediction shape: {final_pred.shape}")