Skip to content
This repository has been archived by the owner on Nov 3, 2023. It is now read-only.

Commit

Permalink
fix end time for TimerMetric (#4536)
Browse files Browse the repository at this point in the history
Co-authored-by: Mozhi Zhang <mozhi@cs.umd.edu>
  • Loading branch information
zhangmozhi and Mozhi Zhang authored May 10, 2022
1 parent ecdfbd0 commit 7118b08
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion parlai/core/metrics.py
Original file line number Diff line number Diff line change
Expand Up @@ -431,7 +431,7 @@ def __add__(self, other: Optional[TimerMetric]) -> TimerMetric:
return self
total: TScalar = self._value + other._value
start: float = min(self._start, other._start)
end: float = max(self._start, other._end)
end: float = max(self._end, other._end)
return type(self)(total, start, end)

def value(self) -> float:
Expand Down

0 comments on commit 7118b08

Please sign in to comment.