composer icon indicating copy to clipboard operation
composer copied to clipboard

Forward metric name to `update_metric`

Open antoinebrl opened this issue 8 months ago • 7 comments

🚀 Feature Request

Motivation

get_metrics returns a mapping between strings and Metrics. However the name isn't available in the update_metric. Checking for types might not be sufficient to uniquely characteristic a metric.

Implementation

The proposed new signature for the update_metric method of the ComposerModel:

- def update_metric(self, batch: Any, outputs: Any, metric: Metric) -> None:
+ def update_metric(self, batch: Any, outputs: Any, metric: Metric, name: str) -> None:

antoinebrl avatar Oct 09 '23 09:10 antoinebrl