Skip to content

Commit

Permalink
rev
Browse files Browse the repository at this point in the history
  • Loading branch information
Borda committed Jun 30, 2021
1 parent 126d62f commit 8e668bd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion torchmetrics/metric.py
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@ def wrapped_func(*args: Any, **kwargs: Any) -> Any:
return wrapped_func

@abstractmethod
def update(self, *_: Any) -> None:
def update(self, *_: Any, **__: Any) -> None:
"""
Override this method to update the state variables of your metric class.
"""
Expand Down
2 changes: 1 addition & 1 deletion torchmetrics/retrieval/retrieval_metric.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ def __init__(
self.add_state("preds", default=[], dist_reduce_fx=None)
self.add_state("target", default=[], dist_reduce_fx=None)

def update(self, preds: Tensor, target: Tensor, indexes: Tensor) -> None:
def update(self, preds: Tensor, target: Tensor, indexes: Tensor) -> None: # type: ignore
""" Check shape, check and convert dtypes, flatten and add to accumulators. """
if indexes is None:
raise ValueError("Argument `indexes` cannot be None")
Expand Down

0 comments on commit 8e668bd

Please sign in to comment.