Skip to content

Implement metrics comparison table & plotting #1707

Open
@LinasKo

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:

  1. Would it be better for plot_aggregate_metric_results to take in a pd.DataFrame? This way, the user can apply their own sorting or preprocessing, but we're not guaranteed to have the fields we need.
  2. Could the naming be improved?

Suggested by @David-rn, discussion

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions