Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
Borda committed May 17, 2024
1 parent 50a4f99 commit 9c90ade
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/torchmetrics/wrappers/transformations.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,9 +160,7 @@ class BinaryTargetTransformer(MetricInputTransformer):
"""

def __init__(
self, wrapped_metric: Union[Metric, MetricCollection], threshold: Union[int, float] = 0, **kwargs: Any
) -> None:
def __init__(self, wrapped_metric: Union[Metric, MetricCollection], threshold: float = 0, **kwargs: Any) -> None:
super().__init__(wrapped_metric, **kwargs)
if not isinstance(threshold, (int, float)):
raise TypeError(f"Expected `threshold` to be of type `int` or `float` but received `{threshold}`")
Expand Down

0 comments on commit 9c90ade

Please sign in to comment.