(self, predicted: str, target: str)
| 6 | self._num_total = 0 |
| 7 | |
| 8 | def update(self, predicted: str, target: str) -> None: |
| 9 | is_correct = target in predicted |
| 10 | self._num_correct += int(is_correct) |
| 11 | self._num_total += 1 |
| 12 | |
| 13 | def get(self) -> float: |
| 14 | return self._num_correct / self._num_total |
no outgoing calls
no test coverage detected