Skip to content

refactor(server_runtime): rename RunHelper to ServerSupervisor - #5526

Merged
ananthsub merged 1 commit into
mainfrom
ananthsub/rename-server-supervisor
Nov 18, 2026
Merged

ananthsub merged 1 commit into
mainfrom
ananthsub/rename-server-supervisor

Conversation

@ananthsub

@ananthsub ananthsub commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

What changed and why

#5235 moved the server supervisor out of nemo_gym/cli/env.py, and #5882 moved it again to nemo_gym/server_runtime/supervisor/server_supervisor.py. Both moves kept the class name RunHelper. This PR renames it to ServerSupervisor, so the class name matches its module.

RunHelper does not say what the class does. The class supervises the run's servers: it starts each configured server process, waits until every server is ready, and shuts them all down. ServerSupervisor names that role. This rename is one of several planned for the reorganization, which give the main orchestration classes names that describe their job. The reorganization kept each rename out of the pure-move PRs so that reviewers could check those moves mechanically.

Every in-repo use now says ServerSupervisor:

  • The CLI commands in nemo_gym/cli/env.py and nemo_gym/cli/eval.py.
  • The in-process benchmark server in nemo_gym/environment/in_process.py.
  • Docstrings and comments in the base server, the H2 ping sidecar launcher and the gdpval resources server.
  • The FAQ page under fern/versions/latest/.
  • The unit tests and the terminal_bench_2_1 benchmark tests. Test classes, methods and test doubles whose names held RunHelper or run_helper were renamed too.

The local variables that held the supervisor were named rh, short for run helper, helper or runner. They are now supervisor, and the test helpers that build one say supervisor in place of runner. Gym already uses "runner" for the harness runner, the verifier runner and others, so the old name was ambiguous as well as stale. Frozen docs under fern/versions/v*/ are unchanged.

Part of the nemo_gym/ reorganization tracked in #5166.

Compatibility

RunHelper shipped in 0.7.0 at three paths. Each one still resolves to ServerSupervisor until 0.10.0. The first access warns with a DeprecationWarning that names nemo_gym.server_runtime.supervisor.server_supervisor.ServerSupervisor and the 0.10.0 removal release.

Old path How it shipped in 0.7.0 How it resolves now
nemo_gym.cli.RunHelper CLI refactor shim, used by NeMo RL MOVED_NAMES["nemo_gym.cli"]
nemo_gym.cli.env.RunHelper Defined there MOVED_NAMES["nemo_gym.cli.env"]
nemo_gym.cli.eval.RunHelper Imported there from nemo_gym.cli.env MOVED_NAMES["nemo_gym.cli.eval"]

Before this change:

  • nemo_gym.cli.RunHelper warned through the CLI refactor shim, which names no removal release.
  • nemo_gym.cli.env.RunHelper warned through MOVED_NAMES as a moved name.
  • nemo_gym.cli.eval.RunHelper resolved through a plain import.

nemo_gym/cli/__init__.py now tries MOVED_NAMES first and falls back to its existing shim for its other names. nemo_gym/cli/env.py and nemo_gym/cli/eval.py already install the standard moved_names_getattr module __getattr__.

nemo_gym.orchestration.server_supervisor never shipped in a release, so RunHelper gets no alias there. tests/unit_tests/fixtures/import_surface.json still lists RunHelper, because it records the names that must keep resolving at their old paths.

No public name embeds run_helper. Only test names did, and those were renamed.

Validation

  • A new test checks each of the three released paths in a fresh interpreter. Each path must return the ServerSupervisor class and emit exactly one warning, and that warning must name the new path and the 0.10.0 removal release.

  • nemo_gym.cli.RunHelper left the CLI compatibility table, which checks the CLI refactor shim. That shim warns on every access, while MOVED_NAMES warns once per process, so the table's in-process check failed whenever an earlier test in the same worker had already read the old name.

  • With the MOVED_NAMES entries for RunHelper removed, the new test fails at all three paths. The NeMo RL import check and the recorded import surface check fail as well. With the entries restored, all of them pass.

  • The test files this PR touches pass, run as below. The exceptions are server directory resolution and server data validation tests in tests/unit_tests/cli/test_cli.py, and the terminal_bench_2_1 recipe test. They fail the same way on main on this host.

    PYTHONPATH=$PWD .venv/bin/python -m pytest -n 16 $(git diff --name-only upstream/main HEAD | grep -E '^tests/.*\.py$|/tests/test_.*\.py$')
  • pre-commit run --files <touched files> passes, including ruff and the import-linter layering check.

  • Rollout evidence: N/A. This rename does not change behavior, and the old names resolve to the same class.

@copy-pr-bot

copy-pr-bot Bot commented Nov 3, 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.

@github-actions

github-actions Bot commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

@ananthsub
ananthsub force-pushed the ananthsub/rename-server-supervisor branch from 7cc3aa4 to 0594347 Compare November 4, 2026 00:59
@ananthsub
ananthsub force-pushed the ananthsub/rename-server-supervisor branch from 0594347 to db074ac Compare November 4, 2026 20:22
@github-actions github-actions Bot added the sla:triage-overdue Review assignment is over the one-business-day SLA label Nov 4, 2026
@ananthsub
ananthsub force-pushed the ananthsub/rename-server-supervisor branch from db074ac to a9cb8ee Compare November 5, 2026 15:07
@nemo-automation-bot
nemo-automation-bot Bot requested review from a team November 6, 2026 22:06
@svcnvidia-nemo-ci svcnvidia-nemo-ci added support User questions, support, or maintenance requests area:orchestration Job submission, deployment, services, and lifecycle management needs-review PR is ready for code review and waiting on a reviewer labels Nov 7, 2026
@ananthsub
ananthsub force-pushed the ananthsub/rename-server-supervisor branch from a9cb8ee to f05e0f2 Compare November 17, 2026 23:55
@nemo-automation-bot
nemo-automation-bot Bot requested a review from a team November 17, 2026 23:56
The server supervisor moved out of nemo_gym/cli/env.py into
nemo_gym/server_runtime/supervisor/server_supervisor.py but kept the
RunHelper name. Name the class after its module.

RunHelper shipped in 0.7.0 at nemo_gym.cli, nemo_gym.cli.env and
nemo_gym.cli.eval. Each of those paths now resolves to ServerSupervisor
through MOVED_NAMES and warns with the new name and the 0.10.0 removal
release. nemo_gym.cli keeps its CLI refactor shim for its other names
and tries MOVED_NAMES first. The server_supervisor path never shipped,
so it gets no alias.

Signed-off-by: Ananth Subramaniam <[email protected]>
@ananthsub
ananthsub force-pushed the ananthsub/rename-server-supervisor branch from f05e0f2 to 8a41eea Compare November 18, 2026 00:34
@ananthsub ananthsub changed the title refactor(orchestration): rename RunHelper to ServerSupervisor refactor(server_runtime): rename RunHelper to ServerSupervisor Nov 18, 2026
@ananthsub
ananthsub merged commit 8ad233f into main Nov 18, 2026
68 checks passed
@ananthsub
ananthsub deleted the ananthsub/rename-server-supervisor branch November 18, 2026 00:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:orchestration Job submission, deployment, services, and lifecycle management needs-review PR is ready for code review and waiting on a reviewer sla:triage-overdue Review assignment is over the one-business-day SLA support User questions, support, or maintenance requests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants