Refactor dataset part to use the new dataset and processor interface
Refactor the SFT and GRPO entry script to adopt the new dataset processor interface introduced in RawDataset and the PROCESSOR_REGISTRY, removing ad‑hoc preprocessing and aligning with the GRPO data path.
Motivation
We recently introduced a unified processor interface and registration mechanism for datasets in PR !1506. The SFT path still wires processors and preprocessing via partials in run_sft.py, which diverges from the new interface and duplicates logic. Unifying both paths reduces maintenance, enables consistent configuration, and simplifies documentation.
Scope
- Replace ad‑hoc processor wiring in run_sft.py with the standard processor interface (TaskDataSpec + PROCESSOR_REGISTRY).
- Ensure datasets used by SFT can declare/select their processor consistently via config (e.g., data.processor).
- Make STF dataset inherit RawDataset class. Unified dataset interface.
- Keep parity with existing SFT features (optional BOS/EOS, add_generation_prompt, optional image preprocessing for CLEVR, etc.) by moving them into the processor layer where appropriate.
- Move customized OmegaConf op into a common place. Refer to this comment.
- Unify dataset initialize with
super.init. Refer to this comment.
For 1/2/4: Done some parts, and will track the remain parts in https://github.com/NVIDIA-NeMo/RL/issues/1658. For 3/6: Done in https://github.com/NVIDIA-NeMo/RL/pull/1649.
So this issue can be closed once 5 is resolved.
QA RCCA Analysis
RCCA Status: Not Required RCCA Category: not_required Test Action: none
Fix PR: N/A Root Cause: This issue is not an actionable closed product-code defect for RCCA; it is enhancement/feature tracking, docs/cosmetic work, placeholder/test issue, or closed non-bug work. Trigger Config: N/A.
Coverage Assessment:
| Area | Result |
|---|---|
| Existing Test | N/A |
| Coverage Status | NOT_REQUIRED |
| Gap | N/A |
| Corrective Action | No RCCA regression test required. |
Conclusion: RCCA not required because this does not represent a QA coverage escape for a fixed NeMo-RL bug.