Skip to content

refactor(automodel): rename the DTensor v2 workers to Automodel - #4282

Merged
terrykong merged 7 commits into
r0.8.0from
yukih/rename-to-automodel-code
Oct 8, 2026
Merged

terrykong merged 7 commits into
r0.8.0from
yukih/rename-to-automodel-code

Conversation

@yuki-97

@yuki-97 yuki-97 commented Sep 27, 2026 •

Copy link
Copy Markdown
Contributor

Part of the DTensor v1 removal series -- overall status is tracked in the description of #4198.

What does this PR do ?

Renames the DTensor v2 workers to Automodel. Pure rename; the only observable change is the
rl.backend tracing tag and the worker Timer label.

What changed

1. Three worker modules and their classes.

before after
models/policy/workers/dtensor_policy_worker_v2.py automodel_policy_worker.py
models/value/workers/dtensor_value_worker_v2.py automodel_value_worker.py
modelopt/models/policy/workers/dtensor_quant_policy_worker_v2.py automodel_quant_policy_worker.py

DTensorPolicyWorkerV2{,Impl}, DTensorValueWorkerV2{,Impl} and DTensorQuantPolicyWorkerV2
lose the backend-version suffix; pyrefly.toml project-includes follows the paths.

2. Two prose mentions the rename made wrong -- a comment in models/policy/__init__.py and the
TORCH_CUDA_ARCH_LIST warning in lm_policy.py, which still said "DTensorPolicyWorker V2".

Deliberately not changed

  1. tests/unit/models/policy/test_dtensor_worker.py keeps its filename -- it carries v2 coverage
    test_automodel_worker.py does not have. Merging the two, the remaining test_dtensor_v2_*
    names and the "DTensor v2" wording are tracked in Rename the remaining DTensor-named tests and wording to Automodel #4535.
  2. docs/guides/dtensor-tp-accuracy.md keeps its filename; docs(automodel): rename the DTensor backend to Automodel #4277 owns the doc sweep.
  3. dtensor_cfg keeps its name -- refactor(automodel): rename the dtensor_cfg config block to automodel_cfg #4283 renames it to automodel_cfg.

🤖 Generated with Claude Code

@copy-pr-bot

copy-pr-bot Bot commented Sep 27, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@github-actions github-actions Bot added the Documentation Improvements or additions to documentation label Sep 27, 2026
@yuki-97 yuki-97 added the CI:L1 Run doctests, unit tests, and functional tests label Sep 27, 2026
@yuki-97

yuki-97 commented Sep 27, 2026

Copy link
Copy Markdown
Contributor Author

/ok to test 7e0c3f2

@yuki-97

yuki-97 commented Sep 28, 2026

Copy link
Copy Markdown
Contributor Author

/ok to test 0bfe2a3

@yuki-97

yuki-97 commented Sep 28, 2026

Copy link
Copy Markdown
Contributor Author

/ok to test 03cbc60

@yuki-97 yuki-97 left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Self-review via /review-pr-team: 4 agents (rename sweep and bug/test review for each of #4282 and #4283) + devil's-advocate pass.

Verdict — no findings above the confidence bar. LGTM, no action needed.

Verified clean

  • With names normalised, the three worker modules are byte-identical to their originals. The only other remaining changes are comments, one warning string and an import reflow.
  • Every class-path string used at runtime resolves: ACTOR_ENVIRONMENTS, POLICY_WORKER_OVERRIDES, worker_builder_cls in lm_policy.py / lm_value.py, the research template's extension class, and the python-<ClassName> frozen-env wrappers.
  • The renamed test files keep their markers and shards. excluded_unit_tests.sh points at the new path, and no --deselect prefix matches the new names.
  • No old names remain in .github/, docker/, tools/, pyrefly.toml, or the pinned Automodel / Gym / Megatron-Bridge submodules.

Lower-priority notes that are not inline

  • Profiling names follow the rename. NRL_NSYS_WORKER_PATTERNS=dtensor_policy_worker_v2 no longer matches, and NVTX ranges are now automodel_policy_worker/*. The documented *policy* pattern is unaffected.
  • L1_Functional_Tests_Other_1 failed at 7e0c3f2 because the research template still imported the old module. 5090d07 fixes it, but that fix has not run on this head yet.
  • The dtensor_v2 spellings left in test_automodel_worker.py function names and the worker's Timer context are left for the #4277 wording pass.

Generated by Claude Code

@yuki-97
yuki-97 marked this pull request as ready for review September 28, 2026 17:08
@yuki-97
yuki-97 changed the base branch from main to r0.8.0 October 1, 2026 04:24
@yuki-97 yuki-97 added the cherry-pick-to-main Opt in: cherry-pick this PR's commit from the release branch back into main label Oct 1, 2026
@yuki-97
yuki-97 force-pushed the yukih/rename-to-automodel-code branch from 03cbc60 to c9dd54f Compare October 1, 2026 04:28
@yuki-97

yuki-97 commented Oct 1, 2026

Copy link
Copy Markdown
Contributor Author

/ok to test c9dd54f

@terrykong terrykong left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM with four small follow-ups. None of them blocks the rename.

Clean, consistent rename — thanks for splitting the series this cleanly. With the names swapped back, the three worker modules match the base exactly. Every class path written as a string still resolves: the venv table, the quant override table, the worker builder class names in the policy and value wrappers, the research template, and the frozen-env wrappers. The renamed test files keep their marks and CI lanes, and no old names are left outside 3rdparty/.

We are not asking for a compatibility alias for the old names. That matches how the v1 removal PR (#4198) handled it.

Before merge: container builds and the L0/L1 tests have not run at c9dd54f yet. L1_Functional_Tests_Other_1 failed earlier on the research template import (fixed in 0fa04f6) and should be green before merge. Our checks were reading the code plus CPU-only unit tests (127 passed); nothing that needs a GPU was run.

The four inline comments, all low severity:

  • the tracing tag still says dtensor_v2;
  • an optional test for the quant worker override table;
  • an "Upgrading from 0.7" note for the release notes;
  • an owner for the leftover dtensor names that the docs PR (#4277) does not cover.

Generated by Claude Code

Comment thread nemo_rl/models/policy/utils.py Resolved
Comment thread tests/unit/excluded_unit_tests.sh Resolved
@yuki-97
yuki-97 force-pushed the yukih/rename-to-automodel-code branch 2 times, most recently from 07987bf to b247612 Compare October 6, 2026 12:29
@yuki-97

yuki-97 commented Oct 6, 2026

Copy link
Copy Markdown
Contributor Author

/ok to test 6a3cddf

terrykong
terrykong previously approved these changes Oct 7, 2026
@yuki-97

yuki-97 commented Oct 7, 2026

Copy link
Copy Markdown
Contributor Author

/ok to test 321a21d

@copy-pr-bot

copy-pr-bot Bot commented Oct 7, 2026

Copy link
Copy Markdown

/ok to test 321a21d

@yuki-97, there was an error processing your request: E2

See the following link for more information: https://docs.gha-runners.nvidia.com/cpr/e/2/

@yuki-97

yuki-97 commented Oct 7, 2026

Copy link
Copy Markdown
Contributor Author

/ok to test 321a21d

@terrykong
terrykong enabled auto-merge (squash) October 7, 2026 17:21
@terrykong
terrykong merged commit fdc8c95 into r0.8.0 Oct 8, 2026
209 of 213 checks passed
@terrykong
terrykong deleted the yukih/rename-to-automodel-code branch October 8, 2026 02:50
yuki-97 added a commit that referenced this pull request Oct 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cherry-pick-to-main Opt in: cherry-pick this PR's commit from the release branch back into main CI:L1 Run doctests, unit tests, and functional tests Documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants