NVIDIA-NeMo / NVIDIA-NeMo/RL

Remove NeMoAutoModelForTokenClassification backport shim once the Automodel pin exports it

Open Beginner friendly
#2,948 0 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Python
Stars
2k
Forks
561
Avg merge
4d 5h
Merged PRs (30d)
145

Description

### Background
`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.)

Contributor guide

Open the contributing guide

Research direction

Start in nemo_rl/models/automodel/setup.py and inspect the try/except/else backport shim for NeMoAutoModelForTokenClassification. Confirm the Automodel pin has moved past upstream commit e1a2f915, then remove the shim and run the relevant tests under tests/unit/models/automodel/. Done means the pinned dependency exports the symbol and no local backport remains.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
machine-learning
Issue type
Refactor
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
72/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.