Skip to content

ConsoleMetricsWriter ​

python
ConsoleMetricsWriter(update_interval: float = 10.0) -> None

Metrics 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.

Source

Methods ​

close ​

python
close() -> None

Stop the background thread and print a final newline.

Source

flush ​

python
flush() -> None

No-op. Console updates are handled by a background thread.

Source

write ​

python
write(tag: str, value: float, step: int) -> None

Buffer 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).

Source

write_histogram ​

python
write_histogram(tag: str, bin_edges: Sequence[float], bin_counts: Sequence[float], step: int) -> None

Ignore 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.

Source

write_params ​

python
write_params(params: dict[str, Any]) -> None

Ignore configuration parameters for the console writer.

Parameters:

  • params (dict[str, Any]) – A dictionary of parameter names and values.

Source