Skip to content
This repository has been archived by the owner on Mar 19, 2024. It is now read-only.

Commit

Permalink
Store scalar version of rolling_eta_secs
Browse files Browse the repository at this point in the history
  • Loading branch information
akainth015 authored and grace-omotoso committed Apr 15, 2021
1 parent 1a9ab14 commit bdf5fd1
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions vissl/hooks/log_hooks.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
All the hooks involved in human-readable logging
"""

import datetime
import logging
import time
from typing import Optional
Expand Down Expand Up @@ -197,12 +196,9 @@ def on_update(self, task: "tasks.ClassyTask") -> None:
rolling_eta_secs = int(
rolling_avg_time * (task.max_iteration - iteration)
)
rolling_eta_str = str(
datetime.timedelta(seconds=int(rolling_eta_secs))
)
rolling_btime = int(1000.0 * rolling_avg_time)
evt_stg.put_scalars(
rolling_btime=rolling_btime, rolling_eta=rolling_eta_str
rolling_btime=rolling_btime, rolling_eta=rolling_eta_secs
)
for writer in task.event_storage_writers:
writer.write()
Expand Down

0 comments on commit bdf5fd1

Please sign in to comment.