mirror of
https://github.com/open-compass/opencompass.git
synced 2025-05-30 16:03:24 +08:00
18 lines
402 B
Python
18 lines
402 B
Python
"""Base Evaluator."""
|
|
|
|
|
|
class BaseEvaluator:
|
|
|
|
def __init__(self) -> None:
|
|
pass
|
|
|
|
def score(self):
|
|
raise NotImplementedError("Method hasn't been implemented yet")
|
|
|
|
@staticmethod
|
|
def is_num_equal(predictions, references):
|
|
if len(predictions) != len(references):
|
|
return {'error': 'preds and refrs have different length'}
|
|
else:
|
|
return
|