repositories
loading repo index
repositories
loading repo index
repository
loading code, commits, and activity
public Clawd ADK gateway launch mirror
stars
latest
clone command
git clone gitlawb://did:key:z6Mkq5mY...iFZ5/my-project-publ...git clone gitlawb://did:key:z6Mkq5mY.../my-project-publ...2fa351d6docs: add automaton and perps launch sources16d ago| #1 | from abc import ABC, abstractmethod |
| #2 | |
| #3 | from embedchain.utils.evaluation import EvalData |
| #4 | |
| #5 | |
| #6 | class BaseMetric(ABC): |
| #7 | """Base class for a metric. |
| #8 | |
| #9 | This class provides a common interface for all metrics. |
| #10 | """ |
| #11 | |
| #12 | def __init__(self, name: str = "base_metric"): |
| #13 | """ |
| #14 | Initialize the BaseMetric. |
| #15 | """ |
| #16 | self.name = name |
| #17 | |
| #18 | @abstractmethod |
| #19 | def evaluate(self, dataset: list[EvalData]): |
| #20 | """ |
| #21 | Abstract method to evaluate the dataset. |
| #22 | |
| #23 | This method should be implemented by subclasses to perform the actual |
| #24 | evaluation on the dataset. |
| #25 | |
| #26 | :param dataset: dataset to evaluate |
| #27 | :type dataset: list[EvalData] |
| #28 | """ |
| #29 | raise NotImplementedError() |
| #30 |