diff --git a/app_utils/utils.py b/app_utils/utils.py index fa02de393a..5dde028ff9 100644 --- a/app_utils/utils.py +++ b/app_utils/utils.py @@ -1348,9 +1348,12 @@ def get_experiments_info(df: DataFrame, q: Q) -> DefaultDict: if eta == 0: eta = "" else: + # if more than one day, show days + # need to subtract 1 day from time_took since strftime shows + # day of year which starts counting at 1 if eta > 86400: eta = time.strftime( - "%-jd %H:%M:%S", time.gmtime(float(eta)) + "%-jd %H:%M:%S", time.gmtime(float(eta - 86400)) ) else: eta = time.strftime("%H:%M:%S", time.gmtime(float(eta))) diff --git a/train.py b/train.py index 051650e98b..0f9c4f3427 100644 --- a/train.py +++ b/train.py @@ -701,8 +701,11 @@ def run(cfg: Any) -> None: write_flag(flag_path, "status", "finished") time_took = time.time() - global_start_time if time_took > 86400: + # if more than one day, show days + # need to subtract 1 day from time_took since strftime shows day of year + # which starts counting at 1 time_took_formatted = time.strftime( - "%-jd %H:%M:%S", time.gmtime(float(time_took)) + "%-jd %H:%M:%S", time.gmtime(float(time_took - 86400)) ) else: time_took_formatted = time.strftime(