Skip to content

Commit

Permalink
FIxed stupid bug
Browse files Browse the repository at this point in the history
  • Loading branch information
AKuederle committed Jul 26, 2024
1 parent 12a9b5e commit 6e705de
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion tests/test_pipelines/test_scorer.py
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ def test_default_agg_method(self, mock_aggregate, scorer_return):
_ = scorer(pipe, data)

expected_called = (
len([s for s in scorer_return.values() if not isinstance(s, type(no_agg))])
len([s for s in scorer_return.values() if not isinstance(s, type(no_agg(None)))])
if isinstance(scorer_return, dict)
else 1
)
Expand Down
2 changes: 1 addition & 1 deletion tpcp/validate/_scorer.py
Original file line number Diff line number Diff line change
Expand Up @@ -420,7 +420,7 @@ def _test_single_score_value(scores: list[any], default_agg: Aggregator):
raise _non_homogeneous_scoring_error
if not isinstance(scores[0], Aggregator):
# If the score is not wrapped in an aggregator, we wrap it in the default aggregator.
scores = [default_agg.clone()(s) for s in scores]
scores = [default_agg(s) for s in scores]
scores[0]._assert_is_all_valid(scores, "single score")
return (
scores[0].clone(),
Expand Down

0 comments on commit 6e705de

Please sign in to comment.