Repository navigation
refactor(automodel): rename the DTensor v2 workers to Automodel - #4282
Conversation
|
/ok to test 7e0c3f2 |
|
/ok to test 0bfe2a3 |
|
/ok to test 03cbc60 |
yuki-97
left a comment
There was a problem hiding this comment.
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_clsinlm_policy.py/lm_value.py, the research template's extension class, and thepython-<ClassName>frozen-env wrappers. - The renamed test files keep their markers and shards.
excluded_unit_tests.shpoints at the new path, and no--deselectprefix 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_v2no longer matches, and NVTX ranges are nowautomodel_policy_worker/*. The documented*policy*pattern is unaffected. L1_Functional_Tests_Other_1failed 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_v2spellings left intest_automodel_worker.pyfunction names and the worker'sTimercontext are left for the #4277 wording pass.
Generated by Claude Code
03cbc60 to
c9dd54f
Compare
|
/ok to test c9dd54f |
terrykong
left a comment
There was a problem hiding this comment.
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
dtensornames that the docs PR (#4277) does not cover.
Generated by Claude Code
07987bf to
b247612
Compare
|
/ok to test 6a3cddf |
Signed-off-by: Yuki Huang <[email protected]>
Signed-off-by: Yuki Huang <[email protected]>
Signed-off-by: Yuki Huang <[email protected]>
Signed-off-by: Yuki Huang <[email protected]>
Signed-off-by: Yuki Huang <[email protected]>
… the POLICY_WORKER_OVERRIDES keys Signed-off-by: Yuki Huang <[email protected]>
Signed-off-by: Yuki Huang <[email protected]>
6a3cddf to
321a21d
Compare
|
/ok to test 321a21d |
@yuki-97, there was an error processing your request: See the following link for more information: https://docs.gha-runners.nvidia.com/cpr/e/2/ |
|
/ok to test 321a21d |
Signed-off-by: Yuki Huang <[email protected]> Signed-off-by: NeMo Bot <[email protected]>
What does this PR do ?
Renames the DTensor v2 workers to Automodel. Pure rename; the only observable change is the
rl.backendtracing tag and the workerTimerlabel.What changed
1. Three worker modules and their classes.
models/policy/workers/dtensor_policy_worker_v2.pyautomodel_policy_worker.pymodels/value/workers/dtensor_value_worker_v2.pyautomodel_value_worker.pymodelopt/models/policy/workers/dtensor_quant_policy_worker_v2.pyautomodel_quant_policy_worker.pyDTensorPolicyWorkerV2{,Impl},DTensorValueWorkerV2{,Impl}andDTensorQuantPolicyWorkerV2lose the backend-version suffix;
pyrefly.tomlproject-includesfollows the paths.2. Two prose mentions the rename made wrong -- a comment in
models/policy/__init__.pyand theTORCH_CUDA_ARCH_LISTwarning inlm_policy.py, which still said "DTensorPolicyWorker V2".Deliberately not changed
tests/unit/models/policy/test_dtensor_worker.pykeeps its filename -- it carries v2 coveragetest_automodel_worker.pydoes not have. Merging the two, the remainingtest_dtensor_v2_*names and the "DTensor v2" wording are tracked in Rename the remaining DTensor-named tests and wording to Automodel #4535.
docs/guides/dtensor-tp-accuracy.mdkeeps its filename; docs(automodel): rename the DTensor backend to Automodel #4277 owns the doc sweep.dtensor_cfgkeeps its name -- refactor(automodel): rename the dtensor_cfg config block to automodel_cfg #4283 renames it toautomodel_cfg.🤖 Generated with Claude Code