Open
Description
The metrics system allows the users to compute a metrics result - a class with values for a specific metrics run.
When comparing multiple models, a natural next step is to aggregate the results into a single table and/or plot them on a single chart.
Let's make this step easy!
I propose two new functions:
def aggregate_metric_results(metrics_results: List[MetricResult], *, include_object_sizes=False) -> pd.DataFrame:
"""
Raises when different types of metrics results are passed in
"""
def plot_aggregate_metric_results(metrics_results: List[MetricResult], *, include_object_sizes=False) -> None:
...
class MetricResult(ABC):
@abstractmethod
def to_pandas():
raise NotImplementedError()
def plot():
raise NotImplementedError()
Several questions we need to address:
- Would it be better for
plot_aggregate_metric_results
to take in apd.DataFrame
? This way, the user can apply their own sorting or preprocessing, but we're not guaranteed to have the fields we need. - Could the naming be improved?
Suggested by @David-rn, discussion