nemo_automodel.components.loggers.metric_logger#
Module Contents#
Classes#
Simple JSON Lines logger. |
|
Functions#
API#
- class nemo_automodel.components.loggers.metric_logger.MetricsSample#
- step: int#
None
- epoch: int#
None
- metrics: Dict[str, Any]#
‘field(…)’
- timestamp: str | None#
None
- to_dict() Dict[str, Any]#
- __post_init__() None#
- nemo_automodel.components.loggers.metric_logger.stack_and_move_tensor_metrics_to_cpu(
- metric_vector: List[nemo_automodel.components.loggers.metric_logger.MetricsSample],
- class nemo_automodel.components.loggers.metric_logger.MetricLogger(
- filepath: str,
- *,
- flush: bool = False,
- append: bool = True,
- buffer_size: int = 100,
Simple JSON Lines logger.
Appends one JSON object per line.
Thread-safe writes via an internal lock.
Creates parent directories as needed.
UTF-8 without BOM, newline per record.
Initialization
- log( ) None#
- _move_to_cpu( ) List[str]#
- _save(lines: List[str]) None#
- close() None#
- __exit__(
- exc_type: type[BaseException] | None,
- exc: BaseException | None,
- tb: Any,
- class nemo_automodel.components.loggers.metric_logger.MetricLoggerDist(
- filepath: str,
- *,
- flush: bool = False,
- append: bool = True,
Bases:
nemo_automodel.components.loggers.metric_logger.MetricLogger- log( ) None#
- close() None#
- __exit__(
- exc_type: type[BaseException] | None,
- exc: BaseException | None,
- tb: Any,
- nemo_automodel.components.loggers.metric_logger.build_metric_logger(
- filepath: str,
- *,
- flush: bool = False,
- append: bool = True,