> For clean Markdown of any page, append .md to the page URL. > For a complete documentation index, see https://docs.nvidia.com/nemo/automodel/v0.4/nemo-automodel/nemo_automodel/components/loggers/llms.txt. > For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.nvidia.com/nemo/automodel/_mcp/server. # nemo_automodel.components.loggers ## Submodules * **[`nemo_automodel.components.loggers.comet_utils`](/nemo-automodel/nemo_automodel/components/loggers/comet_utils)** * **[`nemo_automodel.components.loggers.log_utils`](/nemo-automodel/nemo_automodel/components/loggers/log_utils)** * **[`nemo_automodel.components.loggers.loggers`](/nemo-automodel/nemo_automodel/components/loggers/loggers)** * **[`nemo_automodel.components.loggers.metric_logger`](/nemo-automodel/nemo_automodel/components/loggers/metric_logger)** * **[`nemo_automodel.components.loggers.mlflow_utils`](/nemo-automodel/nemo_automodel/components/loggers/mlflow_utils)** * **[`nemo_automodel.components.loggers.wandb_utils`](/nemo-automodel/nemo_automodel/components/loggers/wandb_utils)** ## Package Contents ### Classes | Name | Description | | ------------------------------------------------------------------------- | -------------------------------------------------------------------- | | [`CometConfig`](#nemo_automodel-components-loggers-loggers-CometConfig) | User-facing Comet ML configuration. | | [`MLflowConfig`](#nemo_automodel-components-loggers-loggers-MLflowConfig) | User-facing MLflow configuration (maps to the YAML `mlflow:` block). | | [`WandbConfig`](#nemo_automodel-components-loggers-loggers-WandbConfig) | User-facing WandB configuration (maps to the YAML `wandb:` block). | ### API ```python class nemo_automodel.components.loggers.loggers.CometConfig( project_name: str = 'automodel', workspace: str | None = None, api_key: str | None = None, experiment_name: str | None = None, tags: list[str] = list(), auto_metric_logging: bool = False ) ``` Dataclass User-facing Comet ML configuration. **`api_key`** `str | None = None` Comet API key. `None` reads from `COMET_API_KEY` env var. --- **`auto_metric_logging`** `bool = False` Enable Comet's automatic metric logging. --- **`experiment_name`** `str | None = None` Display name for this experiment run. --- **`project_name`** `str = 'automodel'` Comet project name. --- **`tags`** `list[str] = field(default_factory=list)` List of string tags attached to the experiment. --- **`workspace`** `str | None = None` Comet workspace. `None` uses the default. --- ```python nemo_automodel.components.loggers.loggers.CometConfig.build( model_name: str | None = None ) -> typing.Any ``` Initialise Comet ML and return the logger (active on rank 0). When `model_name` is provided a `model:<name>` tag is appended and, if `experiment_name` is empty, one is derived from the model name. **Parameters:** **`model_name`** `str | None` — default: None Optional model name used to tag the run and derive an experiment name when none is set. --- **Returns:** `Any` A `CometLogger` instance. ```python class nemo_automodel.components.loggers.loggers.MLflowConfig( experiment_name: str = 'automodel-experiment', run_name: str = '', tracking_uri: str | None = None, artifact_location: str | None = None, tags: dict[str, str] = dict(), resume: bool = True, description: str | None = None, flatten_depth: int | None = 1 ) ``` Dataclass User-facing MLflow configuration (maps to the YAML `mlflow:` block). **`artifact_location`** `str | None = None` Root artifact store URI for the experiment. --- **`description`** `str | None = None` Free-text description shown in the MLflow UI (sets the `mlflow.note.content` tag). --- **`experiment_name`** `str = 'automodel-experiment'` MLflow experiment name. --- **`flatten_depth`** `int | None = 1` Nesting depth for `mlflow.log_params`. `1` (default) splits one level; `None` is fully recursive. --- **`resume`** `bool = True` When `True` (default), look for a `mlflow_run_id` sidecar in the checkpoint dir and resume that run. --- **`run_name`** `str = ''` Display name for the run. --- **`tags`** `dict[str, str] = field(default_factory=dict)` Dictionary of string tags attached to the run. --- **`tracking_uri`** `str | None = None` MLflow tracking server URI. `None` delegates to `MLFLOW_TRACKING_URI` and then MLflow's local default (`sqlite:///mlflow.db` in current releases). --- ```python nemo_automodel.components.loggers.loggers.MLflowConfig.build( checkpoint_dir: str | None = None, run_config: collections.abc.Mapping[str, typing.Any] | None = None ) -> typing.Any ``` Initialise MLflow on rank 0 and start (or resume) a run. Installs a `sys.excepthook` so crashed jobs report as FAILED rather than FINISHED. On non-rank-0 processes returns `None`. **Parameters:** **`checkpoint_dir`** `str | None` — default: None Checkpoint directory used to persist / read the `mlflow_run_id` sidecar for run resumption. --- **`run_config`** `Mapping[str, Any] | None` — default: None Full training config dict logged as MLflow params and as a `config.yaml` artifact. --- **Returns:** `Any` Active `mlflow.entities.Run` on rank 0, or `None`. ```python class nemo_automodel.components.loggers.loggers.WandbConfig( project: str = 'automodel', entity: str | None = None, name: str = '', group: str | None = None, tags: list[str] = list(), notes: str | None = None, swanlab: nemo_automodel.components.loggers.loggers.SwanLabConfig | None = None, extra: dict[str, typing.Any] = dict() ) ``` Dataclass User-facing WandB configuration (maps to the YAML `wandb:` block). The named fields are the common ones; any other key under the YAML `wandb:` block (e.g. `mode`, `dir`, `resume`) is a valid `wandb.init()` kwarg and is preserved verbatim in `extra` and forwarded to `wandb.init()`. **`entity`** `str | None = None` WandB team / entity. `None` uses the default from the wandb config or `WANDB_ENTITY` env var. --- **`extra`** `dict[str, Any] = field(default_factory=dict)` Any additional `wandb.init()` kwargs (`mode`, `dir`, ...) carried through unfiltered. --- **`group`** `str | None = None` Group name for related runs. --- **`name`** `str = ''` Display name for the run. When empty, `build` derives one from the model name. --- **`notes`** `str | None = None` Free-text notes shown in the WandB UI. --- **`project`** `str = 'automodel'` WandB project name. --- **`swanlab`** `SwanLabConfig | None = None` Optional `SwanLabConfig` that mirrors this run to SwanLab (the `wandb.swanlab:` sub-block). --- **`tags`** `list[str] = field(default_factory=list)` List of string tags attached to the run. --- ```python nemo_automodel.components.loggers.loggers.WandbConfig.build( run_config: collections.abc.Mapping[str, typing.Any] | None = None, model_name: str | None = None ) -> typing.Any ``` Initialise WandB and return the run. **Parameters:** **`run_config`** `Mapping[str, Any] | None` — default: None Full training config dict logged to the WandB run. --- **`model_name`** `str | None` — default: None Optional model name used to derive the run name when `name` is empty. --- **Returns:** `Any` Initialised `wandb.Run`. ```python nemo_automodel.components.loggers.loggers.WandbConfig.from_kwargs( kwargs: typing.Any = {} ) -> 'WandbConfig' ``` classmethod Build from a flat kwargs dict, routing unknown keys to `extra`. Keys matching a named field are assigned directly; everything else (valid `wandb.init` params such as `mode`/`dir` that are not first-class fields here) is preserved in `extra`. ## Docs - [nemo_automodel.components.loggers.comet_utils](https://docs.nvidia.com/nemo/automodel/v0.4/nemo-automodel/nemo_automodel/components/loggers/comet_utils.md) - [nemo_automodel.components.loggers.log_utils](https://docs.nvidia.com/nemo/automodel/v0.4/nemo-automodel/nemo_automodel/components/loggers/log_utils.md) - [nemo_automodel.components.loggers.loggers](https://docs.nvidia.com/nemo/automodel/v0.4/nemo-automodel/nemo_automodel/components/loggers/loggers.md) - [nemo_automodel.components.loggers.metric_logger](https://docs.nvidia.com/nemo/automodel/v0.4/nemo-automodel/nemo_automodel/components/loggers/metric_logger.md) - [nemo_automodel.components.loggers.mlflow_utils](https://docs.nvidia.com/nemo/automodel/v0.4/nemo-automodel/nemo_automodel/components/loggers/mlflow_utils.md) - [nemo_automodel.components.loggers.wandb_utils](https://docs.nvidia.com/nemo/automodel/v0.4/nemo-automodel/nemo_automodel/components/loggers/wandb_utils.md)