[https://nvbugs/6523880][fix] Restored the legacy-files.txt entry and regenerated the three derived… - #16943
Conversation
…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>
WalkthroughChangesLegacy tooling coverage
MPI session documentation
Estimated code review effort: 2 (Simple) | ~10 minutes Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Warning Review ran into problems🔥 ProblemsGit: Failed to clone repository. Please run the Comment |
There was a problem hiding this comment.
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
📒 Files selected for processing (5)
.pre-commit-config.yamllegacy-files.txtpyproject.tomlruff-legacy.tomltensorrt_llm/llmapi/mpi_session.py
|
/bot run --disable-fail-fast |
|
PR_Github #62195 [ run ] triggered by Bot. Commit: |
|
PR_Github #62195 [ run ] completed with state
|
|
/bot run --disable-fail-fast |
|
PR_Github #62320 [ run ] triggered by Bot. Commit: |
|
PR_Github #62320 [ run ] completed with state
|
|
/bot run --disable-fail-fast |
|
PR_Github #62352 [ run ] triggered by Bot. Commit: |
|
PR_Github #62352 [ run ] completed with state
|
|
/bot run --disable-fail-fast |
|
PR_Github #62429 [ run ] triggered by Bot. Commit: |
|
PR_Github #62429 [ run ] completed with state
|
|
/bot run --disable-fail-fast |
|
PR_Github #62477 [ run ] triggered by Bot. Commit: |
|
PR_Github #62477 [ run ] completed with state |
Summary
test_cli_flow.pyfromlegacy-files.txtwhile the file still exists, silently promoting it from Group B to Group A (fullruff check/format) which it never conformed to; independently PR [None][test] Add opt-in background prefetch of test MPI sessions and model page cache #15908 added a secondD205toMpiPoolSession.__init__past its ratchet baseline of 1.legacy-files.txtentry and regenerated the three derived configs viascripts/legacy_utils.py gen-configs(no hand edits); rewrote the__init__docstring with a summary line, blank line, and Google-styleArgs:block inside yapf's 80-col limit — no baseline loosened, no rule disabled.Test plan
Links
Dev Engineer Review
tests/integration/defs/accuracy/test_cli_flow.pyto the legacy classification and regenerated all related Ruff/pre-commit configuration entries consistently.MpiPoolSession.__init__documentation into a compliant Google-styleArgs:section, clarifying shutdown and environment override behavior without changing executable logic or API signatures.QA Engineer Review