nemo_gym.artifacts.exporters.mlflow
nemo_gym.artifacts.exporters.mlflow
Module Contents
Classes
Functions
Data
API
Bases: BaseExporter
MLflow backend.
Configured by mlflow_tracking_uri, mlflow_experiment_name and mlflow_run_name in the
global config, plus mlflow_tracking_token for servers that require authentication.
Uses MlflowClient with an explicit run id rather than the fluent mlflow.* API, which
tracks the active run in thread-local state that Gym’s async call sites don’t share.
log_batch arguments: a post-run export waits for each batch.
With MLflow’s async logging (MLFLOW_ENABLE_ASYNC_LOGGING) a batch call returns before the server has the
batch. The post-run receipt says the whole run reached the backend, so the export logs synchronously and a
failed batch raises before the receipt is written. A live run keeps MLflow’s default.
Whether the recorded run still exists and is not deleted; a new run takes the place of one that is not.
Certify the same fresh live run only after the caller verifies final collection and health files.
Tag the live run superseded_by=<run_id> and the post-run export’s run supersedes=<live_run_id>.
A reader that finds two runs for one evaluation picks the one the receipt names. Only tags are set, with this live activation’s client: metrics, params and status are untouched, and MLflow accepts tags on a finished run. Each failure is logged and ignored; the receipt is already written.
Yield (dotted_key, leaf) pairs. MLflow params are flat, unlike W&B’s nested config.
Whether the rollout landed in the output: a failed attempt carries its failure class, and a no-persist one is written nowhere.
Map a metric/param/tag name onto what MLflow accepts: character set, path shape, length.
Gym emits names MLflow rejects, e.g. pass@1 from pass@k metrics. Returns None for a name
made only of separators, leaving nothing to sanitize into. Dropping that one entry is
deliberate: MLflow rejects an entire log_batch when any single name is invalid.