MetricsWriter
Abstract base class for writing metrics to an output destination.
Methods
close
python
close() -> NoneClose the writer and release any resources.
flush
python
flush() -> NoneFlush any buffered output to the destination.
write
python
write(tag: str, value: float, step: int) -> NoneWrite a scalar metric value.
Parameters:
tag(str) – The metric tag (for example, "Learner/Loss").value(float) – The scalar value.step(int) – The global step.
write_histogram
python
write_histogram(tag: str, bin_edges: Sequence[float], bin_counts: Sequence[float], step: int) -> NoneWrite a pre-binned histogram.
Parameters:
tag(str) – The metric tag (for example, "Restarts/Advance_Rate_By_Band").bin_edges(Sequence[float]) – Then + 1bin boundaries, ascending.bin_counts(Sequence[float]) – Thenbin heights.step(int) – The global step.
write_params
python
write_params(params: dict[str, Any]) -> NoneWrite configuration parameters.
Parameters:
params(dict[str, Any]) – A dictionary of parameter names and values.