from abc import ABC, abstractmethod | |
from typing import Dict, List | |
class BaseTaskMetrics(ABC): | |
def reset(self): | |
pass | |
def add_batch(self, predictions: List[str], references: List[str], *args, **kwargs) -> None: | |
pass | |
def compute(self, *args, **kwargs) -> Dict[str, float]: | |
pass | |