Skip to content

Commit

Permalink
fix multilabel in exact_match (#1474)
Browse files Browse the repository at this point in the history
* Update exact_match.py
* Apply suggestions from code review

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Jirka <jirka.borovec@seznam.cz>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Co-authored-by: Jirka Borovec <6035284+Borda@users.noreply.github.com>
Co-authored-by: Nicki Skafte Detlefsen <skaftenicki@gmail.com>
(cherry picked from commit 91ac6fe)
  • Loading branch information
7shoe authored and Borda committed Feb 20, 2023
1 parent e3ea771 commit 59b1748
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Expand Up @@ -17,6 +17,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Fixed type hints in methods belonging to `MetricTracker` wrapper ([#1472](https://github.com/Lightning-AI/metrics/pull/1472))


- Fixed `multilabel` in `ExactMatch` ([#1474](https://github.com/Lightning-AI/metrics/pull/1474))



## [0.11.1] - 2023-01-30

### Fixed
Expand Down
2 changes: 1 addition & 1 deletion src/torchmetrics/functional/classification/exact_match.py
Expand Up @@ -233,7 +233,7 @@ def exact_match(
if task == "multiclass":
assert num_classes is not None
return multiclass_exact_match(preds, target, num_classes, multidim_average, ignore_index, validate_args)
if task == "multilalbe":
if task == "multilabel":
assert num_labels is not None
return multilabel_exact_match(
preds, target, num_labels, threshold, multidim_average, ignore_index, validate_args
Expand Down

0 comments on commit 59b1748

Please sign in to comment.