[docs]defcompute_single_item(self,*args,**kwargs)->float:"""Compute the score for a single item."""raiseNotImplementedError("Subclasses must implement this method.")
# TODO: support multi-threading or async to speed up evaluation
[docs]defcompute(self,*args,**kwargs)->Any:"""Evaluate a list of predictions and ground truth values. and return overall score and per-item scores."""raiseNotImplementedError("Subclasses must implement this method.")