From 3960f552df006ea3c2efbcc886d06ba30fe3c880 Mon Sep 17 00:00:00 2001 From: jirka Date: Fri, 2 Aug 2024 15:41:57 +0200 Subject: [PATCH] types --- src/torchmetrics/text/chrf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/torchmetrics/text/chrf.py b/src/torchmetrics/text/chrf.py index c7274d0b993..742388d06ff 100644 --- a/src/torchmetrics/text/chrf.py +++ b/src/torchmetrics/text/chrf.py @@ -187,7 +187,7 @@ def _get_state_name(text: str, n_gram_level: str, n: int) -> str: def _get_text_n_gram_iterator(self) -> Iterator[Tuple[Tuple[str, int], str]]: """Get iterator over char/word and reference/hypothesis/matching n-gram level.""" - return itertools.product(zip(_N_GRAM_LEVELS, [self.n_char_order, self.n_word_order]), _TEXT_LEVELS) # type: ignore[return-value] + return itertools.product(zip(_N_GRAM_LEVELS, [self.n_char_order, self.n_word_order]), _TEXT_LEVELS) def plot( self, val: Optional[Union[Tensor, Sequence[Tensor]]] = None, ax: Optional[_AX_TYPE] = None