Skip to content

fix: use min_output_len value in query_llm inputs - #721

Open
andrewwhitecdw wants to merge 1 commit into
NVIDIA-NeMo:mainfrom
andrewwhitecdw:andrewwhitecdw/fix/query-llm-min-output-len
Open

fix: use min_output_len value in query_llm inputs#721
andrewwhitecdw wants to merge 1 commit into
NVIDIA-NeMo:mainfrom
andrewwhitecdw:andrewwhitecdw/fix/query-llm-min-output-len

Conversation

@andrewwhitecdw

Copy link
Copy Markdown
Contributor

Bug

query_llm filled the min_output_len input with max_output_len, so the minimum-length request was ignored and the maximum length was used for both.

Fix

Use min_output_len when building the min_output_len input array.

Test

Updated TestNemoQueryLLMPyTorch::test_query_llm_with_min_output_len to verify min_output_len and max_output_len are passed as distinct values.

Verification

ruff check nemo_deploy/llm/query_llm.py tests/unit_tests/deploy/test_query_llm.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-variable substitution and the test follows existing patterns.

query_llm filled the min_output_len input with max_output_len, so the

minimum length request was ignored and the maximum length was used for both.

Updates the existing test to verify min_output_len and max_output_len are

passed as distinct values.

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.

@oyilmaz-nvidia

Copy link
Copy Markdown
Contributor

/ok to test d1a5589

@oyilmaz-nvidia
oyilmaz-nvidia enabled auto-merge (squash) August 18, 2026 22:41

@oyilmaz-nvidia oyilmaz-nvidia left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Linting issues need to be fixed before merging.

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.

2 participants