Skip to content

DRAT: fix: run Nemotron Nano v2 workplace assistant recipe#2868

Open
snowmanwwg wants to merge 2 commits into
mainfrom
fix/nemo-gym-nemotron-nano-v2-parser
Open

DRAT: fix: run Nemotron Nano v2 workplace assistant recipe#2868
snowmanwwg wants to merge 2 commits into
mainfrom
fix/nemo-gym-nemotron-nano-v2-parser

Conversation

@snowmanwwg

@snowmanwwg snowmanwwg commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

The PR makes the Nemotron Nano v2 workplace-assistant NeMo-Gym recipe runnable with the current vLLM stack.

It fixes three concrete issues we hit:

  1. Missing/invalid vLLM tool parser
    The recipe was configured to use tool_parser: nemotron_json, but no working local parser plugin was wired in. The model’s HF-cache parser was also incompatible with the installed
    vLLM package paths.
    The PR adds nemo_rl/models/generation/vllm/tool_parsers/nemotron_json.py and points the recipe at it.

  2. vLLM parser constructor mismatch
    Current vLLM instantiates tool parsers as parser_cls(tokenizer, request.tools). The previous shim only accepted tokenizer, causing:
    TypeError: init() takes 2 positional arguments but 3 were given
    The new parser accepts both signatures, so it works with current vLLM and remains tolerant of older base parser constructors.

  3. Slurm Ray job cleanup
    After the driver command finished, ray.sub did not signal the Ray sidecars to stop, so the Slurm allocation could remain alive even after training completed.
    The PR touches LOG_DIR/ENDED after a non-empty COMMAND exits and preserves the driver exit code.

  4. Context-length overflow handling
    In nemo_rl/models/generation/vllm/vllm_worker_async.py:716, I changed the async chat endpoint so our local ValueError for overlong prompts is converted to HTTP 400, same as vLLM
    validation errors.

also makes malformed model tool-call output non-fatal and quieter: malformed ... generations fall back to normal content instead of crashing request handling
or spamming exception tracebacks.

Usage

  • You can potentially add a usage example below
# Add a code snippet demonstrating how to use this

Before your PR is "Ready for review"

Pre checks:

  • Make sure you read and followed Contributor guidelines
  • Did you write any new necessary tests?
  • Did you run the unit tests and functional tests locally? Visit our Testing Guide for how to run tests
  • Did you add or update any necessary documentation? Visit our Document Development Guide for how to write, build and test the docs.

Additional Information

  • ...

Signed-off-by: Wenwen Gao <wenweng@cw-dfw-cs-001-vscode-01.cm.cluster>
@snowmanwwg snowmanwwg requested review from a team as code owners June 18, 2026 05:21
@copy-pr-bot

copy-pr-bot Bot commented Jun 18, 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.

@snowmanwwg snowmanwwg changed the title DRAT: fix: run Nemotron Nano v2 workplace recipe DRAT: fix: run Nemotron Nano v2 workplace assistant recipe Jun 20, 2026
Signed-off-by: Wenwen Gao <wenweng@cw-dfw-cs-001-vscode-01.cm.cluster>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant