nemo_gym.exporters.mlflow
nemo_gym.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.
Cut an over-long name in the middle, keeping both ends.
Gym names carry their identity at the edges — benchmark and agent in the prefix, the statistic
in the suffix (gpqa.../simple_agent/mean/reward) — so the middle is what can be spared.
Yield (dotted_key, leaf) pairs. MLflow params are flat, unlike W&B’s nested config.
Neutralize only the path segments MLflow rejects, leaving the rest of the name intact.
MLflow requires an already-normalized relative path, so it rejects empty segments (from
leading, doubled or trailing slashes) and the traversal forms . and ...
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.