Skip to content

fix: use integer dtype for random_seed in query script#722

Open
andrewwhitecdw wants to merge 1 commit into
NVIDIA-NeMo:mainfrom
andrewwhitecdw:andrewwhitecdw/fix/query-random-seed-dtype
Open

fix: use integer dtype for random_seed in query script#722
andrewwhitecdw wants to merge 1 commit into
NVIDIA-NeMo:mainfrom
andrewwhitecdw:andrewwhitecdw/fix/query-random-seed-dtype

Conversation

@andrewwhitecdw

Copy link
Copy Markdown

Bug

The standalone scripts/deploy/nlp/query.py script passed random_seed as np.single (float), but the Triton input spec and the streaming variant use np.int_. This could cause type mismatches when the model expects an integer seed.

Fix

Use np.int_ for the random_seed input array.

Test

Added tests/unit_tests/deploy/test_query_script.py::TestQueryLLMInputs::test_random_seed_uses_int_dtype, which mocks pytriton.client and verifies the seed array uses integer dtype.

Verification

ruff check scripts/deploy/nlp/query.py tests/unit_tests/deploy/test_query_script.py and ruff format --check ... pass.

Note: The Export-Deploy dev environment (uv sync) downloads CUDA/TransformerEngine wheels that overwhelm this laptop, so the full pytest suite could not be run locally. The change is a single dtype substitution and the test mocks the heavy pytriton dependency.

The standalone query script passed random_seed as np.single (float), but

the Triton input spec and the streaming variant use np.int_. This could cause

type mismatches when the model expects an integer seed.

Adds a unit test that mocks pytriton and verifies the dtype is np.int_.

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.

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.

1 participant