ConsoleMetricsWriter
ConsoleMetricsWriter(update_interval: float = 10.0) -> NoneMetrics writer that buffers updates and periodically prints a formatted progress line to the console.
Most metrics are ignored; only the ones in the console metric map are tracked for display. The env-steps/min and learner-iterations/min rates shown on the line are computed with the shared RateTracker (the same per-minute windowed rate used for the Throughput/* scalars).
Initialize the ConsoleMetricsWriter.
Parameters:
update_interval(float) – Minimum time in seconds between console updates.
Methods
close
close() -> NoneStop the background thread and print a final newline.
flush
flush() -> NoneNo-op. Console updates are handled by a background thread.
write
write(tag: str, value: float, step: int) -> NoneBuffer a metric value if it is relevant for the console display.
Only metrics listed in the console metric map are captured; all others are ignored.
Parameters:
tag(str) – The metric tag.value(float) – The scalar value.step(int) – The global step (unused for console tracking).
write_histogram
write_histogram(tag: str, bin_edges: Sequence[float], bin_counts: Sequence[float], step: int) -> NoneIgnore histograms; the console shows scalars only.
Parameters:
tag(str) – The metric tag.bin_edges(Sequence[float]) – The bin boundaries.bin_counts(Sequence[float]) – The bin heights.step(int) – The global step.
write_params
write_params(params: dict[str, Any]) -> NoneIgnore configuration parameters for the console writer.
Parameters:
params(dict[str, Any]) – A dictionary of parameter names and values.