Skip to content

fix: add missing f-string prefix in canary2 assertion#15950

Open
andrewwhitecdw wants to merge 1 commit into
NVIDIA-NeMo:mainfrom
andrewwhitecdw:fix-canary2-missing-fstring
Open

fix: add missing f-string prefix in canary2 assertion#15950
andrewwhitecdw wants to merge 1 commit into
NVIDIA-NeMo:mainfrom
andrewwhitecdw:fix-canary2-missing-fstring

Conversation

@andrewwhitecdw

@andrewwhitecdw andrewwhitecdw commented Jul 24, 2026

Copy link
Copy Markdown

Fixes a missing f-string prefix in the canary2 prompt formatter so the assertion message interpolates the EOS token and id instead of printing literal {CANARY_EOS} and {eos}.

  • One-character fix in nemo/collections/common/prompts/canary2.py
  • Added tests/collections/common/test_canary2_prompt.py with a regression test

Tested:

uv run python -m pytest tests/collections/common/test_canary2_prompt.py -v
# 1 passed

cc @nithinraok for review

Signed-off-by: Andrew White <andrewh@cdw.com>
@copy-pr-bot

copy-pr-bot Bot commented Jul 24, 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.

@nithinraok

Copy link
Copy Markdown
Member

/claude review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants