Skip to content

Commit a5e2e42

Browse files
Changes ETA to hh:mm:ss format (#75)
* Change eta to hh:mm:ss format --------- Co-authored-by: Mayank Mittal <[email protected]>
1 parent 4944331 commit a5e2e42

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

rsl_rl/runners/on_policy_runner.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -386,9 +386,9 @@ def log(self, locs: dict, width: int = 80, pad: int = 35):
386386
f"""{'-' * width}\n"""
387387
f"""{'Total timesteps:':>{pad}} {self.tot_timesteps}\n"""
388388
f"""{'Iteration time:':>{pad}} {iteration_time:.2f}s\n"""
389-
f"""{'Total time:':>{pad}} {self.tot_time:.2f}s\n"""
390-
f"""{'ETA:':>{pad}} {self.tot_time / (locs['it'] - locs['start_iter'] + 1) * (
391-
locs['start_iter'] + locs['num_learning_iterations'] - locs['it']):.1f}s\n"""
389+
f"""{'Time elapsed:':>{pad}} {time.strftime("%H:%M:%S", time.gmtime(self.tot_time))}\n"""
390+
f"""{'ETA:':>{pad}} {time.strftime("%H:%M:%S", time.gmtime(self.tot_time / (locs['it'] - locs['start_iter'] + 1) * (
391+
locs['start_iter'] + locs['num_learning_iterations'] - locs['it'])))}\n"""
392392
)
393393
print(log_string)
394394

0 commit comments

Comments
 (0)