Source code for swarmauri.core.metrics.IMetric
from typing import Any
from abc import ABC, abstractmethod
[docs]
class IMetric(ABC):
"""
Defines a general interface for metrics within the SwarmaURI system.
Metrics can be anything from system performance measurements to
machine learning model evaluation metrics.
"""
@abstractmethod
def __call__(self, **kwargs) -> Any:
"""
Retrieves the current value of the metric.
Returns:
The current value of the metric.
"""
pass