Hello everyone!
I’m working on creating a custom evaluation metric using the Hugging Face evaluate library, following this guide:
My custom metric doesn’t rely on the default predictions and references parameters, but the compute() method from the EvaluationModule class seems to require them to be passed, even though they are irrelevant for my use case.
Here’s the method signature for reference:
def compute(self, *, predictions=None, references=None, **kwargs) -> Optional[dict]:
The issue I’m facing is that calling compute() without predictions and references leads to errors because the method expects these arguments to be added (via add_batch or add) before calling compute(). However, for my custom metric, these arguments are unnecessary.
Does anyone know how I can work around this to use compute() without needing predictions and references?
Thanks in advance!