Skip to content

Commit

Permalink
fix: Re-instantiate stateful metrics in PerformanceTrigger (#630)
Browse files Browse the repository at this point in the history
Since our metric objects are stateful, we had a form of averaging on the
metrics, instead of evaluating them on each window separately.
  • Loading branch information
MaxiBoether authored Sep 10, 2024
1 parent d01a6b7 commit 4e1550d
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,9 @@ def _run_evaluation(
assert self.model_downloader is not None
assert self.context and self.context.pipeline_config is not None

# Since the metric objects are stateful, we need to re-instantiate them before each evaluation.
self._metrics = setup_metrics(self.config.evaluation.dataset.metrics)

evaluation_dataloader = prepare_trigger_dataloader_fixed_keys(
self.dataloader_info, [key for key, _ in interval_data]
)
Expand Down

0 comments on commit 4e1550d

Please sign in to comment.