mirror of
https://github.com/clearml/clearml
synced 2025-01-31 17:17:00 +00:00
Fix Job.elapsed()
This commit is contained in:
parent
f86198bbe5
commit
38230626c2
@ -105,7 +105,9 @@ class TrainsJob(object):
|
||||
if not self.task_started and str(self.task.status) != Task.TaskStatusEnum.in_progress:
|
||||
return -1
|
||||
self.task_started = True
|
||||
return (datetime.now() - self.task.data.started).timestamp()
|
||||
if not self.task.data.started:
|
||||
return -1
|
||||
return (datetime.now(tz=self.task.data.started.tzinfo) - self.task.data.started).total_seconds()
|
||||
|
||||
def iterations(self):
|
||||
# type: () -> int
|
||||
|
Loading…
Reference in New Issue
Block a user