Skip to content

[https://nvbugs/6899682][fix] Isolate disaggregated client outputs per test - #20139

Merged
chuangz0 merged 1 commit into
NVIDIA:release/1.3from
chuangz0:fix/6899682-disagg-client-output-isolation-release-1.3
Oct 15, 2026
Merged

chuangz0 merged 1 commit into
NVIDIA:release/1.3from
chuangz0:fix/6899682-disagg-client-output-isolation-release-1.3

Conversation

@chuangz0

@chuangz0 chuangz0 commented Oct 12, 2026 •

Copy link
Copy Markdown
Collaborator

Description

Problem. On release/1.3, test_disaggregated_mixed[TinyLlama-1.1B-Chat-v1.0] failed on B300 in QA LLM_FUNCTION_CLUSTER_TEST build 1937 (nvbugs/6899682). The error was Expected string 'The capital of Germany is Berlin' not found in output.json. The test's own client log shows correct answers in all 8 client runs. The output.json it checked holds completions from a different model.

Root cause. run_client_tests() let disagg_client.py write output.json, output_streaming.json and the chat outputs into the pytest cwd, and read them back from there. QA runs its test splits concurrently on many nodes, all from one checkout on shared storage, so they share that cwd. In build 1937, test_disaggregated_deepseek_v3_lite_bf16_tllm_gen_helix ran its client phase on another node at the same time. One completion in the failing output.json is identical, character for character, to one the helix client logged.

Only the TinyLlama test fails, because the DeepSeek check accepts the TinyLlama answers. A rerun on a single node cannot reproduce the failure, because no other test writes to its cwd.

Fix.

  • run_client_tests() takes a required client_output_dir, and writes and checks every client output there. run_disaggregated_test() passes its work_dir, a fresh tempfile.mkdtemp() directory per test.
  • Remove cleanup_output_files(). It deleted output.json and output_streaming.json from the shared cwd, which could break another test's check with a FileNotFoundError. None of its callers read those files.

Same change as #20140 on main.

Test Coverage

Two B300 nodes ran pytest from one cwd on shared storage, as QA does. They used the release/1.3 LLM_DOCKER_IMAGE (…-19345) and the release/1.3 L0_PostMerge build 27 wheel (14772f4). The GPU runs used an earlier revision of this PR that behaves the same as the final code; only the parameter name, the docstring and local variables differ.

Scenario Before After
test_disaggregated_mixed while a helper rewrites output*.json in the cwd every 0.1 s with the DeepSeek output from build 1937 Failed with the QA assertion Passed
Node A loops test_disaggregated_mixed; node B runs the DeepSeek-V3-Lite helix test 3 times; same cwd 1 of 8 mixed runs failed with the QA assertion; its output.json held the real DeepSeek output. All 3 helix runs passed. All 7 mixed runs and all 3 helix runs passed. Nothing was written to the shared cwd.

With the fix, test_disaggregated_overlap_transceiver_runtime_python (checks output_chat.json), test_disaggregated_chat_completion_tool_calls and test_disaggregated_diff_max_tokens also pass on B300.

In the previous CI run on this PR (L0_MergeRequest_PR 177), all single-GPU disaggregated tests passed on A10 and H100. pre-commit is clean.

PR Checklist

Please review the following before submitting your PR:

  • PR description clearly explains what and why. If using CodeRabbit's summary, please make sure it makes sense.

  • PR Follows TRT-LLM CODING GUIDELINES to the best of your knowledge.

  • Test cases are provided for new code paths (see test instructions)

  • If PR introduces API changes, an appropriate PR label is added - either api-compatible or api-breaking. For api-breaking, include BREAKING in the PR title.

  • Any new dependencies have been scanned for license and vulnerabilities

  • CODEOWNERS updated if ownership changes

  • Documentation updated as needed

  • Update tava architecture diagram if there is a significant design change in PR.

  • The reviewers assigned automatically/manually are appropriate for the PR.

  • Please check this after reviewing the above items as appropriate for this PR.

GitHub Bot Help

To see a list of available CI bot commands, please comment /bot help.

🤖 Generated with Claude Code

Dev Engineer Review

  • The stated objective is to prevent concurrent disaggregated tests from overwriting or verifying another test’s client output. The supplied diff does not show the described output-directory changes or removal of cleanup_output_files(). It shows formatting and docstring edits, plus a logger-call style change. The implementation change therefore cannot be confirmed from the available diff.

QA Engineer Review

  • One test-code file changed: tests/integration/defs/disaggregated/test_disaggregated.py. No test functions or IDs are visibly added or removed in the supplied diff.
  • The file’s disaggregated tests are listed in CI and manual-QA lists. The diff does not show the claimed output-isolation test, so test coverage for that behavior cannot be confirmed. Coverage verdict: needs follow-up.
  • Reported tests include the output-isolation test and B300 scenarios. The CI summary also reports an UNSTABLE release pipeline; GPU health-check coverage was not run.

Per-File QA Perspective

  • tests/integration/defs/disaggregated/test_disaggregated.py: Intended behavior changes would isolate client output files per test and remove shared-directory cleanup, but the supplied diff does not show those changes. Existing disaggregated tests appear in CI and manual-QA lists; no new isolation test is visible.

@coderabbitai

coderabbitai Bot commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository: NVIDIA/TensorRT-LLM/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Enterprise
  • Run ID: 77b4a1e5-d4f5-4aa6-b92e-0c284d4699a4
📥 Commits

Reviewing files that changed from the base of the PR and between 5a0739e and abd40a2.

📒 Files selected for processing: 1
  • tests/integration/defs/disaggregated/test_disaggregated.py

Included review availability: This review used your included allowance. Your plan provides up to 12 included reviews per hour; 10 remain after this review.

Walkthrough

Client output files for disaggregated tests are written to and verified in the test work directory. The shared output cleanup helper and its calls in three runners are removed.

Changes

Disaggregated test output

Layer / File(s) Summary
Route and verify client output in the work directory
tests/integration/defs/disaggregated/test_disaggregated.py
run_client_tests writes and verifies output files under client_output_dir. run_disaggregated_test passes work_dir as that directory. The cleanup helper and its calls in three runners are removed.

Priority: ➖ Normal

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Merge Risk: ⚪ Minimal · up to abd40

No actionable output-routing issue is established. The change is mergeable after normal checks.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 70.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 10 functions across 2 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Title check Passed The title follows the required ticket and type format and clearly describes the main change: isolating disaggregated client outputs per test.
Description check Passed The description explains the problem, root cause, fix, test coverage, and checklist status. It provides specific reproduction and validation results relevant to the change.
  • Fix all pre-merge checks with AI
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

@chuangz0

Copy link
Copy Markdown
Collaborator Author

/bot run

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #77416 [ run ] triggered by Bot. Commit: 5a0739e Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #77416 [ run ] completed with state SUCCESS. Commit: 5a0739e
/LLM/release-1.3/L0_MergeRequest_PR pipeline #177 completed with status: 'UNSTABLE'

CI Report

⚠️ Multi-GPU Label Required:
Multi-GPU tests require the ci: full pre-merge approved label on this PR. Either:

  • Wait for the PR to be fully approved — the label is added automatically once approval is complete. Having unresolved open comments is fine, or
  • If needed, ask a member of NVIDIA/trt-llm-ci-approvers to add the label manually.
    Then re-trigger CI with the same bot command (no rebase needed).

⚠️ Action Required:

  • Please check the failed tests and fix your PR
  • If you cannot view the failures, ask the CI triggerer to share details
  • Once fixed, request an NVIDIA team member to trigger CI again

Link to invocation

@nv-xtf nv-xtf left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM

…r test

run_client_tests() let disagg_client.py write output.json,
output_streaming.json and the chat outputs into the pytest cwd, then
read them back from there. QA runs its test splits as concurrent
one-node jobs from one checkout on shared storage, so another test can
overwrite these files between the client run and the check. In
release/1.3 QA build 1937, the DeepSeek-V3-Lite helix test overwrote
the output.json of test_disaggregated_mixed[TinyLlama-1.1B-Chat-v1.0].
That test then failed, although its own responses were correct.

run_client_tests() now takes a required client_output_dir, and writes
and checks every client output there. run_disaggregated_test() passes
its per-test work_dir.

Remove cleanup_output_files(). It deleted these files from the shared
cwd when the aiperf, mixed-stress and cancel tests started, and none of
those tests read them.

Signed-off-by: Chuang Zhu <111838961+chuangz0@users.noreply.github.com>
@chuangz0
chuangz0 force-pushed the fix/6899682-disagg-client-output-isolation-release-1.3 branch from 5a0739e to abd40a2 Compare October 14, 2026 07:53
@chuangz0

Copy link
Copy Markdown
Collaborator Author

/bot run

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #77740 [ run ] triggered by Bot. Commit: abd40a2 Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #77740 [ run ] completed with state SUCCESS. Commit: abd40a2
/LLM/release-1.3/L0_MergeRequest_PR pipeline #207 completed with status: 'FAILURE'

CI Report

⚠️ Action Required:

  • Please check the failed tests and fix your PR
  • If you cannot view the failures, ask the CI triggerer to share details
  • Once fixed, request an NVIDIA team member to trigger CI again

CI Agent Failure Analysis

Link to invocation

@chuangz0

Copy link
Copy Markdown
Collaborator Author

/bot run

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #77979 [ run ] triggered by Bot. Commit: abd40a2 Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #77979 [ run ] completed with state FAILURE. Commit: abd40a2
/LLM/release-1.3/L0_MergeRequest_PR pipeline #234 completed with status: 'FAILURE'

CI Report

⚠️ Action Required:

  • Please check the failed tests and fix your PR
  • If you cannot view the failures, ask the CI triggerer to share details
  • Once fixed, request an NVIDIA team member to trigger CI again

CI Agent Failure Analysis

Link to invocation

@chuangz0

Copy link
Copy Markdown
Collaborator Author

/bot run

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #78010 [ run ] triggered by Bot. Commit: abd40a2 Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #78010 [ run ] completed with state SUCCESS. Commit: abd40a2
/LLM/release-1.3/L0_MergeRequest_PR pipeline #238 completed with status: 'SUCCESS'

CI Report

Link to invocation

@chuangz0
chuangz0 merged commit 8204ec6 into NVIDIA:release/1.3 Oct 15, 2026
13 checks passed
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.

5 participants