Skip to content

Commit

Permalink
remove logger from function
Browse files Browse the repository at this point in the history
  • Loading branch information
bmramor committed Mar 31, 2024
1 parent cf305ae commit 6d650dd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
5 changes: 2 additions & 3 deletions outrank/core_ranking.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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
Expand All @@ -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':
Expand Down
4 changes: 2 additions & 2 deletions tests/ranking_module_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand All @@ -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)

Expand Down

0 comments on commit 6d650dd

Please sign in to comment.