Skip to content

Commit

Permalink
fix: choose latest added metric if their timestamps are the same
Browse files Browse the repository at this point in the history
  • Loading branch information
jtsextonMITRE authored and keithmanville committed Jan 30, 2025
1 parent 693317a commit e44c2f6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tests/unit/restapi/lib/mock_mlflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,9 @@ def get_run(self, id: str) -> MockMlflowRun:
# find the latest metric for each metric name
if (
metric.key not in output_metrics
or metric.timestamp > output_metrics[metric.key].timestamp
# use >= here since we append to the list in log_metric and want to make sure we
# return the latest metric available if they have the same timestamp
or metric.timestamp >= output_metrics[metric.key].timestamp
):
output_metrics[metric.key] = metric

Expand Down

0 comments on commit e44c2f6

Please sign in to comment.