You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Remove NeMoAutoModelForTokenClassification backport shim once the Automodel pin exports it #2948
nemo_rl/models/automodel/setup.py contains a local backport shim that
defines NeMoAutoModelForTokenClassification when the pinned Automodel
submodule does not export it. The currently pinned Automodel commit
(24b47e8) predates upstream commit e1a2f915, which added NeMoAutoModelForTokenClassification as a one-line subclass (mirroring NeMoAutoModelForSequenceClassification). The value-model path with reward_model_type='regression' needs this class, so we replicate it
locally instead of bumping the submodule.
Action
Once the Automodel pin is bumped past e1a2f915 (so it exports NeMoAutoModelForTokenClassification), delete the try/except/else
backport shim in nemo_rl/models/automodel/setup.py.
Tripwire
The else: raise RuntimeError(...) branch in that try/except fails loudly
the moment Automodel starts exporting the symbol, signaling that this shim
can be removed. (Optionally complemented by a unit test under tests/unit/models/automodel/ asserting the symbol is still missing.)
Working on this: checking whether the current Automodel pin already exports NeMoAutoModelForTokenClassification (i.e. is past upstream e1a2f915), and will open a PR to remove the backport shim in nemo_rl/models/automodel/setup.py if so.
Update: checked current main — this is already done, so no PR from me.
The Automodel pin is now b916107a, which is 645 commits ahead of upstream e1a2f915 (merge-base is e1a2f915 itself), and nemo_automodel/__init__.py at that pin exports NeMoAutoModelForTokenClassification.
nemo_rl/models/automodel/setup.py on main (HEAD da067f1) imports the symbol directly from nemo_automodel; the try/except/else backport shim and the RuntimeError tripwire are gone, and no backport string remains in nemo_rl/ or tests/.
The removal landed in build(automodel): bump Automodel to r0.6.0 #3498 (c158373bea, 2026-08-29, "build(automodel): bump Automodel to r0.6.0"), which bumped the pin 24b47e8 → 1814c6c and deleted the shim in setup.py (37+/97-). That PR did not reference this issue, which is likely why it stayed open.
Activity
fix(automodel): migrate setup.py to the r0.6.0 distributed API
fix(automodel): migrate setup.py to the r0.6.0 distributed API
fix(automodel): migrate setup.py to the r0.6.0 distributed API
fix(automodel): migrate setup.py to the r0.6.0 distributed API
fix(automodel): migrate setup.py to the r0.6.0 distributed API
fix(automodel): migrate setup.py to the r0.6.0 distributed API
fix(automodel): migrate setup.py to the r0.6.0 distributed API
four1er commentedon Nov 23, 2026
Working on this: checking whether the current Automodel pin already exports
NeMoAutoModelForTokenClassification(i.e. is past upstreame1a2f915), and will open a PR to remove the backport shim innemo_rl/models/automodel/setup.pyif so.four1er commentedon Nov 23, 2026
Update: checked current
main— this is already done, so no PR from me.b916107a, which is 645 commits ahead of upstreame1a2f915(merge-base ise1a2f915itself), andnemo_automodel/__init__.pyat that pin exportsNeMoAutoModelForTokenClassification.nemo_rl/models/automodel/setup.pyonmain(HEADda067f1) imports the symbol directly fromnemo_automodel; thetry/except/elsebackport shim and theRuntimeErrortripwire are gone, and nobackportstring remains innemo_rl/ortests/.c158373bea, 2026-08-29, "build(automodel): bump Automodel to r0.6.0"), which bumped the pin24b47e8→1814c6cand deleted the shim insetup.py(37+/97-). That PR did not reference this issue, which is likely why it stayed open.Suggest closing this as completed by #3498.