Skip to content

Make MLflow and Weights & Biases dependencies optional #3207

Closed

Description

@cwing-nvidia

Problem

mlflow, mlflow-skinny, and wandb are currently installed as core NeMo Gym dependencies even when users do not configure those integrations. These SDKs and their transitive dependencies increase installation size, resolution constraints, security-maintenance burden, and the chance that an unrelated backend blocks a core Gym install.

MLflow is used both by the rollout exporter and by the GitLab dataset/model-registry integration, so both call paths need to remain supported when its dependency becomes optional.

Proposal

  • Move the MLflow and W&B SDKs from core dependencies into optional extras (exact extra names to be decided).
  • Preserve lazy imports so a normal Gym install works when neither SDK is present.
  • Keep the MLflow-backed GitLab registry workflow available through the MLflow extra.
  • When a configured feature is missing its SDK, emit a clear, actionable installation message rather than failing during unrelated imports.
  • Audit dependency pins that are present only because of MLflow or W&B and move or remove them as appropriate.
  • Ensure development/CI extras still install both integrations so their existing tests continue to run.

Acceptance criteria

  • A core installation can import and run Gym without MLflow or W&B installed.
  • Configuring the MLflow exporter, W&B exporter, or MLflow-backed GitLab workflow without its extra produces an actionable error or warning.
  • Installing the corresponding extra preserves current behavior.
  • Tests cover both missing-dependency and installed-dependency paths.
  • Installation documentation identifies the required extras.

Related work

Activity

  1. self-assigned this
    on Sep 10, 2026
  2. added a commit that references this issue on Oct 4, 2026
    128eab4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions