long-code-arena / src /evaluation /base_task_metrics.py
saridormi's picture
Make files submissions instructions task-specific & other small changes
6c92442
raw
history blame
355 Bytes
from abc import ABC, abstractmethod
from typing import Dict, List
class BaseTaskMetrics(ABC):
def reset(self):
pass
@abstractmethod
def add_batch(self, predictions: List[str], references: List[str], *args, **kwargs) -> None:
pass
@abstractmethod
def compute(self, *args, **kwargs) -> Dict[str, float]:
pass