nemo_gym.exporters

View as Markdown

Run-metadata exporters.

setup_exporters opens one exporter per configured backend during global config resolution; call sites then fan out through the module-level export_* helpers.

A backend’s module — and with it a multi-hundred-millisecond tracking SDK import — is loaded only once its config says it is wired up. That is why the registry pairs each backend with a config model from config_types rather than asking the exporter class whether it is available.

Submodules

Package Contents

Functions

NameDescription
_load_exporter_class-
export_metrics-
export_rollouts-
get_exportersThe exporters opened for this process. Empty when no backend is configured.
setup_exportersOpen every backend that is fully configured, and log the run config to each.
teardown_exportersClose all open exporters. Safe to call repeatedly and when none are open.

Data

EXPORTER_REGISTRY

_EXPORTERS

logger

API

nemo_gym.exporters._load_exporter_class(
class_path: str
) -> type[nemo_gym.exporters.base.BaseExporter]
nemo_gym.exporters.export_metrics(
metrics: dict[str, typing.Any],
step: typing.Optional[int] = None
) -> None
nemo_gym.exporters.export_rollouts(
rollouts: list[dict[str, typing.Any]]
) -> None
nemo_gym.exporters.get_exporters() -> list[nemo_gym.exporters.base.BaseExporter]

The exporters opened for this process. Empty when no backend is configured.

nemo_gym.exporters.setup_exporters(
global_config_dict: omegaconf.DictConfig
) -> list[nemo_gym.exporters.base.BaseExporter]

Open every backend that is fully configured, and log the run config to each.

Replaces any previously opened exporters. A backend that fails to start is skipped with a warning: telemetry must not take the run down with it.

nemo_gym.exporters.teardown_exporters() -> None

Close all open exporters. Safe to call repeatedly and when none are open.

nemo_gym.exporters.EXPORTER_REGISTRY: dict[str, tuple[type[ExporterConfig], str]] = {'wandb': (WANDBConfig, 'nemo_gym.exporters.wandb:WandbExporter'), 'mlflow': (ML...
nemo_gym.exporters._EXPORTERS: list[BaseExporter] = []
nemo_gym.exporters.logger = logging.getLogger(__name__)