Skip to content

[https://nvbugs/6523880][fix] Restored the legacy-files.txt entry and regenerated the three derived… - #16943

Open
trtllm-agent wants to merge 1 commit into
NVIDIA:mainfrom
tensorrt-cicd:repair-bot-bug6523880
Open

[https://nvbugs/6523880][fix] Restored the legacy-files.txt entry and regenerated the three derived…#16943
trtllm-agent wants to merge 1 commit into
NVIDIA:mainfrom
tensorrt-cicd:repair-bot-bug6523880

Conversation

@trtllm-agent

@trtllm-agent trtllm-agent commented Jul 28, 2026

Copy link
Copy Markdown
Collaborator

Summary

Test plan

  • Verify fix on the same GPU type as the original failure
  • Check for regressions in related tests

Links

Dev Engineer Review

  • Restored tests/integration/defs/accuracy/test_cli_flow.py to the legacy classification and regenerated all related Ruff/pre-commit configuration entries consistently.
  • Reworked MpiPoolSession.__init__ documentation into a compliant Google-style Args: section, clarifying shutdown and environment override behavior without changing executable logic or API signatures.
  • Configuration paths and formatting exclusions are consistent; no duplicates or unintended scope changes identified.

QA Engineer Review

  • No test code or test-list files were modified; only the classification of an existing integration test was restored.
  • No test functions were added, modified, or removed.
  • Verdict: sufficient.

…i_session D205

L0_PostMerge "Release Check" runs pre-commit over all files and failed on
three hooks, from two independent regressions.

1. ruff + ruff-format on tests/integration/defs/accuracy/test_cli_flow.py

   PR NVIDIA#16612 dropped 537 entries from legacy-files.txt while removing legacy
   python relics. test_cli_flow.py is the only one of those 537 whose file
   still exists on disk, so dropping its entry deleted nothing -- it silently
   reclassified the file from Group B (yapf/isort/autoflake formatting plus
   supplemental ruff-legacy lint) into Group A (full ruff check + ruff
   format), a style it has never conformed to. That surfaced 4 ruff findings
   (I001 plus three E501 from the medusa/eagle choice-tree literals) and a
   whole-file ruff-format rewrite.

   Restored the legacy-files.txt entry and regenerated the derived configs
   with `python scripts/legacy_utils.py gen-configs`, which adds the path to
   ruff-legacy.toml, the managed pyproject.toml block and the managed
   .pre-commit-config.yaml block. The file is already clean under yapf,
   isort, autoflake and ruff-legacy, so its classification is consistent
   again with no formatting churn.

2. ruff-legacy on tensorrt_llm/llmapi/mpi_session.py

   PR NVIDIA#15908 added an env_overrides paragraph to MpiPoolSession.__init__,
   whose docstring opens directly with `"""Args:`. That gave the file a
   second D205 against a ratchet baseline of D205: 1.

   Rewrote the docstring with a summary line, a blank line and a Google-style
   Args: block, re-wrapped inside yapf's 80-column limit. The file is back to
   its baseline counts (D200: 1, D205: 1, D415: 1); the baseline itself is
   unchanged and no rule is disabled.

Signed-off-by: handongl <handongl@nvidia.com>
@coderabbitai

coderabbitai Bot commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Walkthrough

Changes

Legacy tooling coverage

Layer / File(s) Summary
Register integration test with legacy tooling
.pre-commit-config.yaml, legacy-files.txt, pyproject.toml, ruff-legacy.toml
Adds tests/integration/defs/accuracy/test_cli_flow.py to legacy file lists and Ruff configuration.

MPI session documentation

Layer / File(s) Summary
Clarify MpiPoolSession arguments
tensorrt_llm/llmapi/mpi_session.py
Expands documentation for wait_shutdown and env_overrides behavior without changing executable logic.

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

Suggested reviewers: chzblych

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title is specific and matches the main changes: restoring the legacy file entry and regenerating derived configs.
Description check ✅ Passed The description covers the issue, fix, test plan, and bug link, but it omits the template's PR Checklist section.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Warning

Review ran into problems

🔥 Problems

Git: Failed to clone repository. Please run the @coderabbitai full review command to re-trigger a full review. If the issue persists, set path_filters to include or exclude specific files.


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

@coderabbitai coderabbitai Bot 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.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@tensorrt_llm/llmapi/mpi_session.py`:
- Around line 248-256: Update the wait_shutdown documentation near
_wait_workers_exit() to state that shutdown waits up to the 30-second timeout
and may return early with a warning if workers remain alive. Clarify that this
is best-effort and callers must not assume worker GPU memory has been released
after the timeout.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 33f1fdef-15bb-404f-9bb3-b942379f8927

📥 Commits

Reviewing files that changed from the base of the PR and between e552a61 and 3c8c74f.

📒 Files selected for processing (5)
  • .pre-commit-config.yaml
  • legacy-files.txt
  • pyproject.toml
  • ruff-legacy.toml
  • tensorrt_llm/llmapi/mpi_session.py

Comment on lines +248 to +256
wait_shutdown: when True, ``shutdown()`` blocks until the spawned
worker processes have actually exited.
``MPIPoolExecutor.shutdown`` returns at disconnect, but a
worker's GPU memory is only released when its process exits;
callers that start new GPU work right after ``shutdown()``
(e.g. CI test infrastructure handing a pre-spawned pool to the
next test) race that release and can OOM. Off by default:
production teardown does not need the barrier and keeps its
current latency.

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.

🩺 Stability & Availability | 🟡 Minor | ⚡ Quick win

Document the shutdown timeout and best-effort behavior.

This says wait_shutdown=True blocks until workers have actually exited, but _wait_workers_exit() returns after its 30-second deadline even when a worker is still alive. Describe this as waiting up to the timeout, with an explicit warning/early return, otherwise callers may incorrectly assume GPU memory has been released before starting new work.

Based on the supplied implementation, _wait_workers_exit() is bounded by 30 seconds.

Suggested wording
-            wait_shutdown: when True, ``shutdown()`` blocks until the spawned
-                worker processes have actually exited.
+            wait_shutdown: when True, ``shutdown()`` waits for the spawned
+                worker processes to exit, up to the internal timeout.
+                If a worker remains alive after the timeout, shutdown logs a
+                warning and returns without guaranteeing that its GPU memory
+                has been released.
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
wait_shutdown: when True, ``shutdown()`` blocks until the spawned
worker processes have actually exited.
``MPIPoolExecutor.shutdown`` returns at disconnect, but a
worker's GPU memory is only released when its process exits;
callers that start new GPU work right after ``shutdown()``
(e.g. CI test infrastructure handing a pre-spawned pool to the
next test) race that release and can OOM. Off by default:
production teardown does not need the barrier and keeps its
current latency.
wait_shutdown: when True, ``shutdown()`` waits for the spawned
worker processes to exit, up to the internal timeout.
If a worker remains alive after the timeout, shutdown logs a
warning and returns without guaranteeing that its GPU memory
has been released.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@tensorrt_llm/llmapi/mpi_session.py` around lines 248 - 256, Update the
wait_shutdown documentation near _wait_workers_exit() to state that shutdown
waits up to the 30-second timeout and may return early with a warning if workers
remain alive. Clarify that this is best-effort and callers must not assume
worker GPU memory has been released after the timeout.

@Wanli-Jiang

Copy link
Copy Markdown
Collaborator

/bot run --disable-fail-fast

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #62195 [ run ] triggered by Bot. Commit: 3c8c74f Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #62195 [ run ] completed with state FAILURE. Commit: 3c8c74f
/LLM/main/L0_MergeRequest_PR pipeline #50364 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

@Wanli-Jiang

Copy link
Copy Markdown
Collaborator

/bot run --disable-fail-fast

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #62320 [ run ] triggered by Bot. Commit: 3c8c74f Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #62320 [ run ] completed with state FAILURE. Commit: 3c8c74f
/LLM/main/L0_MergeRequest_PR pipeline #50489 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

@Wanli-Jiang

Copy link
Copy Markdown
Collaborator

/bot run --disable-fail-fast

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #62352 [ run ] triggered by Bot. Commit: 3c8c74f Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #62352 [ run ] completed with state FAILURE. Commit: 3c8c74f
/LLM/main/L0_MergeRequest_PR pipeline #50519 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

@Wanli-Jiang

Copy link
Copy Markdown
Collaborator

/bot run --disable-fail-fast

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #62429 [ run ] triggered by Bot. Commit: 3c8c74f Link to invocation

@YihuiLu512 YihuiLu512 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

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #62429 [ run ] completed with state SUCCESS. Commit: 3c8c74f
/LLM/main/L0_MergeRequest_PR pipeline #50587 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

@Wanli-Jiang

Copy link
Copy Markdown
Collaborator

/bot run --disable-fail-fast

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #62477 [ run ] triggered by Bot. Commit: 3c8c74f Link to invocation

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.

7 participants