added basic stats to viewer (#259)

This commit is contained in:
evonneng authored and GitHub committed 2022-08-09 15:30:27 -07:00
1 parent 543f3e2e3b
commit 29a6e02c07
4 files changed
+82 -16

No files matched your search

+2
View File
@@ -116,6 +116,7 @@ def put_time(name: str, duration: float, step: int, avg_over_steps: bool = True,
remain_iter = GLOBAL_BUFFER["max_iter"] - step
remain_time = remain_iter * GLOBAL_BUFFER["events"][name]["avg"]
put_scalar(EventName.ETA, remain_time, step)
GLOBAL_BUFFER["viewer/train_eta"] = _format_time(remain_time)
@check_main_thread
@@ -152,6 +153,7 @@ def setup_event_writers(config: LoggingConfig, max_iter: int) -> None:
GLOBAL_BUFFER["max_buffer_size"] = config.max_buffer_size
GLOBAL_BUFFER["steps_per_log"] = config.steps_per_log
GLOBAL_BUFFER["events"] = {}
GLOBAL_BUFFER["viewer/train_eta"] = "Paused"
class Writer: