Skip to content

docs(contribute): add a guide to writing an exporter for gym eval export - #5077

Merged
prokotg merged 10 commits into
prokotg/eval-export-submitfrom
prokotg/eval-export-contributor-guide
Nov 3, 2026
Merged

prokotg merged 10 commits into
prokotg/eval-export-submitfrom
prokotg/eval-export-contributor-guide

Conversation

@prokotg

@prokotg prokotg commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • A guide for contributors adding an exporter for gym eval export: contribute/exporters.mdx, with a card on the Contribute overview.
  • It covers how an export runs, the Exporter contract (RunArtifacts, the settings model, ExportResult states and exit codes), registration in run_exporter_registry.py and what gym eval submit adds, when to choose an in-process or an isolated exporter, testing, and credential handling.
  • Two worked examples: an in-process summary exporter (named per run, published atomically, every filesystem error returned as failed), and an isolated acme exporter with its worker file. atif and mlflow are pointed to as real references.
  • The example code lives in tests/unit_tests/exporter_guide/. Tests run it (the isolated one against a fake acme_sdk through the real worker), and a test checks that the page's code blocks match those files exactly.

Docs only; no behavior change. Part of #2977 (export-aware evaluation runs).

PR plan

Separate PRs; steps 1-8 are stacked (stack #4910). Goal: make gym eval export pluggable so a finished run can go to tracking systems without live exporters, and gym eval submit can export after each benchmark.

  1. save the masked, unresolved config from gym eval run (feat(eval): save the masked config beside rollouts from gym eval run #4908)
  2. RunArtifacts and path derivation helpers (feat(eval): add RunArtifacts to derive a run's files from its rollouts path #4909)
  3. Exporter base class and registry, starting with atif, plus the positional exporter CLI argument (--format deprecated) (feat(eval): add the Exporter base class and registry, with atif as the first exporter #4911)
  4. post-run mlflow and wandb export: shared metrics flattening, BaseExporter.export() and the already-exported guard (feat(eval): export a finished run to MLflow or W&B with gym eval export #4914)
  5. isolated-venv subprocess runner for directory exporters (feat(eval): add IsolatedExporter to run an exporter's backend work in its own venv #4915)
  6. a second isolated-venv exporter (feat(eval): export a finished run to EvalRDL with gym eval export evalrdl #4965)
  7. gym eval submit integration: an export map with job-level defaults and per-benchmark overrides, validation, install extras, and a job-script tail (Slurm only at first) (feat(orchestration): run exports after each benchmark of gym eval submit #4974)
  8. This PR: contributor guide: add an exporter (user-facing docs land in each step's PR)

Validation

  • test_exporter_guide.py: 18 passed (the examples also cover run-specific output names, atomic publishing and filesystem errors returned as failed). pre-commit: passed.
  • Changing an example file makes the page-sync test fail. Following the page's "Register It" steps with the real CLI, gym eval export summary ... succeeded and a second run reported skipped (the temporary registry entries were reverted).

Rollout evidence

N/A: documentation and tests only.

@prokotg
prokotg added this pull request to stack #4910 October 26, 2026 07:36
@copy-pr-bot

copy-pr-bot Bot commented Oct 26, 2026

Copy link
Copy Markdown

Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually.

Contributors can view more details about this message here.

@svcnvidia-nemo-ci svcnvidia-nemo-ci added area:evaluation Evaluation, rollout collection, reward profiling, comparison, and exporters docs Documentation-only updates or documentation debt labels Oct 26, 2026
@prokotg
prokotg force-pushed the prokotg/eval-export-contributor-guide branch from a872db5 to 07e8f05 Compare October 26, 2026 11:03
@prokotg
prokotg force-pushed the prokotg/eval-export-contributor-guide branch from 07e8f05 to eb77d40 Compare October 27, 2026 07:18
@prokotg
prokotg force-pushed the prokotg/eval-export-contributor-guide branch from eb77d40 to e6b3022 Compare October 27, 2026 07:31
@prokotg
prokotg force-pushed the prokotg/eval-export-contributor-guide branch from e6b3022 to 91bf6bc Compare October 27, 2026 07:45
@prokotg
prokotg force-pushed the prokotg/eval-export-contributor-guide branch 2 times, most recently from 900da59 to f38079e Compare October 27, 2026 08:14
@prokotg
prokotg force-pushed the prokotg/eval-export-contributor-guide branch from f38079e to f4dbd30 Compare October 27, 2026 08:52
@prokotg
prokotg force-pushed the prokotg/eval-export-contributor-guide branch from f4dbd30 to 4be5e3f Compare October 27, 2026 09:02
@prokotg
prokotg force-pushed the prokotg/eval-export-contributor-guide branch from 4be5e3f to 316696f Compare October 27, 2026 09:13
@prokotg
prokotg marked this pull request as ready for review October 27, 2026 10:56
@prokotg

prokotg commented Oct 28, 2026

Copy link
Copy Markdown
Contributor Author

/ok to test 5e743f2

@prokotg

prokotg commented Oct 28, 2026

Copy link
Copy Markdown
Contributor Author

/review

@svcnvidia-nemo-ci svcnvidia-nemo-ci left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SHIP

LGTM — no remaining eligible findings in this follow-up.

Verified all four previously reported failures are resolved in current source:

  • The summary exporter distinguishes the reported same-filename runs, publishes through a temporary sibling, and returns expected input/output filesystem failures as FAILED.
  • Acme preparation now guards precondition checks, directory creation, and copying before environment construction.

Checked the regression and preservation assertions, mirrored guide blocks, and directly affected exporter/worker contracts. The worker-environment stub accepts the interpreter argument used by production. The summary-I/O topic was independently checked because its delegated report was unavailable.

This was a targeted follow-up, not a fresh whole-PR review. The previously reviewed tree was unavailable, limiting inter-review comparison to supplied historical evidence and current source. No eligible new regression was established. Static inspection only; tests and the Fern build were not executed.

Note: formal approval is not available for this request, so this review is posted as a comment only.

Review generated by codex. This was a findings-only review. Request a full review with /review reset=true.

@prokotg

prokotg commented Oct 29, 2026

Copy link
Copy Markdown
Contributor Author

/review

@svcnvidia-nemo-ci svcnvidia-nemo-ci left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SHIP

LGTM — no remaining eligible findings in this follow-up.

Verified the four previously reported failures remain resolved in current source:

  • The summary exporter distinguishes the reported same-filename runs, publishes only complete output, and returns input/output filesystem failures as FAILED.
  • Acme preparation guards precondition checks, directory creation, and copying before environment construction.

Checked the relevant regression and preservation assertions, mirrored guide examples, and directly affected contracts for submit settings, credentials, worker launch/timeouts, and completion markers. The summary and Acme/worker topics were checked directly because two delegated reports were unavailable.

This was a targeted follow-up, not a fresh whole-PR review. The previously reviewed tree was unavailable, limiting inter-review comparison to supplied historical evidence and current source. No eligible introduced regression was established. Static inspection only; tests and the Fern build were not executed.

Note: formal approval is not available for this request, so this review is posted as a comment only.

Review generated by codex. This was a findings-only review. Request a full review with /review reset=true.

@prokotg

prokotg commented Oct 30, 2026

Copy link
Copy Markdown
Contributor Author

/ok to test f8cdcc7

@prokotg

prokotg commented Oct 30, 2026

Copy link
Copy Markdown
Contributor Author

/review

@svcnvidia-nemo-ci svcnvidia-nemo-ci left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SHIP

LGTM — no remaining eligible findings in this follow-up.

Verified that the four previously reported failures remain fixed:

  • The summary exporter distinguishes the reported same-filename runs, publishes only complete output, and returns expected input/output filesystem failures as FAILED.
  • Acme preparation guards precondition checks, directory creation, and copying before environment construction.

Checked the relevant regression and preservation assertions, mirrored examples, and affected contracts for submit settings, credential handling, worker launch/timeouts, completion markers, and per-export result retention. The summary and Acme/worker topics were checked directly because their delegated reports were unavailable.

This was a targeted follow-up, not a fresh whole-PR review. The previously reviewed tree was unavailable, limiting inter-review comparison to supplied historical evidence and current source. No eligible introduced regression was established. Static inspection only; tests and the Fern build were not executed.

Review generated by codex. This was a findings-only review. Request a full review with /review reset=true.

@prokotg

prokotg commented Nov 2, 2026

Copy link
Copy Markdown
Contributor Author

/ok to test 4f2d01c

One page with the Exporter contract, registration, in-process versus isolated exporters, and a worked
example of each. The example code lives in tests/unit_tests/exporter_guide, is run by tests, and a test
checks that the page quotes it exactly.

Signed-off-by: Tomasz Grzegorzek <tgrzegorzek@nvidia.com>
Signed-off-by: Tomasz Grzegorzek <tgrzegorzek@nvidia.com>
…mple

Signed-off-by: Tomasz Grzegorzek <tgrzegorzek@nvidia.com>
…er example

Signed-off-by: Tomasz Grzegorzek <tgrzegorzek@nvidia.com>
… run id

Signed-off-by: Tomasz Grzegorzek <tgrzegorzek@nvidia.com>
…ide the returned-failure boundary

Name the summary after the whole run path so runs sharing a rollouts
filename do not skip each other, publish it atomically so a failed write
is retried instead of skipped, and guard every input and preparation
filesystem call so an OSError returns a failed result.

Signed-off-by: Tomasz Grzegorzek <tgrzegorzek@nvidia.com>
…terpreter

Signed-off-by: Tomasz Grzegorzek <tgrzegorzek@nvidia.com>
…d isolated-exporter changes

Say that submit credentials go through driver.env and not export settings, that
an isolated exporter can bound its worker with worker_timeout_s, what the
worker launch guarantees, how submit passes string settings to Hydra, that a
settings model can define is_available, that ExportResult.failed takes exit_code
as a keyword, that the example test replaces the worker environment to add
PYTHONPATH, and that a post-run export keeps its own done marker.

Signed-off-by: Tomasz Grzegorzek <tgrzegorzek@nvidia.com>
…ugh its own export step

Signed-off-by: Tomasz Grzegorzek <tgrzegorzek@nvidia.com>
…uide

Signed-off-by: Tomasz Grzegorzek <tgrzegorzek@nvidia.com>
@prokotg

prokotg commented Nov 3, 2026

Copy link
Copy Markdown
Contributor Author

/ok to test 240efbc

@github-actions

github-actions Bot commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

🔄 Merge queue validation started! You can track the progress here: https://github.com/NVIDIA-NeMo/Gym/actions/runs/41672241110

This branch was previously deployed

1 inactive deployment
public — 240efbc6 Deployed Nov 3, 2026 by copy-pr-bot[bot] via release / finalize / notify #9617
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:evaluation Evaluation, rollout collection, reward profiling, comparison, and exporters docs Documentation-only updates or documentation debt needs-review PR is ready for code review and waiting on a reviewer

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants