Skip to content

Commit

Permalink
Fix bug evaluator
Browse files Browse the repository at this point in the history
  • Loading branch information
thieu1995 committed Aug 18, 2024
1 parent 8d371b2 commit e7c47e6
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion intelelm/utils/evaluator.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,10 @@ def get_metric_sklearn(task="classification", metric_names=None):
else:
continue
# Convert the method to a scorer using make_scorer
scorers[metric_name] = make_scorer(metric_method)
if met.SUPPORT[metric_name]["type"] == "min":
greater_is_better = False
else:
greater_is_better = True
scorers[metric_name] = make_scorer(metric_method, greater_is_better=greater_is_better)
# Now, you can use this scorers dictionary
return scorers

0 comments on commit e7c47e6

Please sign in to comment.