From 6d650ddb7694d0dfafc06f5c247bc525e84cb0cf Mon Sep 17 00:00:00 2001 From: Blaz Mramor Date: Sun, 31 Mar 2024 21:40:21 +0200 Subject: [PATCH] remove logger from function --- outrank/core_ranking.py | 5 ++--- tests/ranking_module_test.py | 4 ++-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/outrank/core_ranking.py b/outrank/core_ranking.py index 5633ada..30f892c 100644 --- a/outrank/core_ranking.py +++ b/outrank/core_ranking.py @@ -186,7 +186,6 @@ def enrich_with_transformations( def compute_combined_features( input_dataframe: pd.DataFrame, - logger: Any, args: Any, pbar: Any, is_3mr: bool = False, @@ -547,7 +546,7 @@ def compute_batch_ranking( if args.interaction_order > 1 or args.reference_model_JSON: pbar.set_description('Constructing new features') input_dataframe = compute_combined_features( - input_dataframe, logger, args, pbar, + input_dataframe, args, pbar, ) # in case of 3mr we compute the score of combinations against the target @@ -556,7 +555,7 @@ def compute_batch_ranking( 'Constructing features for computing relations in 3mr', ) input_dataframe = compute_combined_features( - input_dataframe, logger, args, pbar, True, + input_dataframe, args, pbar, True, ) if args.include_noise_baseline_features == 'True' and args.heuristic != 'Constant': diff --git a/tests/ranking_module_test.py b/tests/ranking_module_test.py index e49880c..fd99092 100644 --- a/tests/ranking_module_test.py +++ b/tests/ranking_module_test.py @@ -82,7 +82,7 @@ def test_compute_combinations(self): random_df.columns = ['F1', 'F2', 'F3'] local_pbar = tqdm.tqdm(total=100, position=0) transformed_df = compute_combined_features( - random_df, None, args, local_pbar, + random_df, args, local_pbar, ) self.assertEqual(transformed_df.shape[1], 4) @@ -91,7 +91,7 @@ def test_compute_combinations(self): random_df = pd.DataFrame(random_matrix) random_df.columns = ['F1', 'F2', 'F3'] transformed_df = compute_combined_features( - random_df, None, args, local_pbar, + random_df, args, local_pbar, ) self.assertEqual(transformed_df.shape[1], 6)