Skip to content

[TRTLLM-13546][feat] Add error classification patterns (1c.1)#15677

Merged
chienchunhung merged 1 commit into
NVIDIA:mainfrom
chienchunhung:WideEP-FT/1c.1-error-classification
Jul 2, 2026
Merged

[TRTLLM-13546][feat] Add error classification patterns (1c.1)#15677
chienchunhung merged 1 commit into
NVIDIA:mainfrom
chienchunhung:WideEP-FT/1c.1-error-classification

Conversation

@chienchunhung

@chienchunhung chienchunhung commented Jun 26, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Add WideEP fault-tolerance error patterns to the pyexecutor error classifier.
  • Classify unrecoverable CUDA/context, peer-loss, communicator-abort, NVSHMEM, and MPI-rank-loss signals as immediate fatal.
  • Classify WideEP collective/transport timeout and DeepEP/NIXL/RDMA failure signals as severe so they drain the existing error budget faster.
  • Add focused unit coverage and route the new test through the pre-merge A10 PyTorch CI list.

Design scope

This implements the 1c.1 pattern-only portion of the WideEP fault-tolerance roadmap. It does not add new severity classes, per-rank budgets, or routing/reconfiguration behavior.

Tests

  • python3 scripts/test_to_stage_mapping.py --tests unittest/_torch/pyexecutor/test_error_classification.py -> A10-PyTorch-1, A10-PyTorch-2
  • python3 -m py_compile tensorrt_llm/_torch/pyexecutor/error_classification.py tests/unittest/_torch/pyexecutor/test_error_classification.py
  • Manual execution of all test_error_classification.py assertions with a stub for pytest.mark.parametrize
  • git diff --check

pytest was not available in the local environment (No module named pytest).

Summary by CodeRabbit

  • Bug Fixes
    • Expanded error classification to better recognize additional fatal GPU/CUDA/context-corruption, NCCL, MPI, RDMA, and NIXL failure messages.
    • Improved detection of timeout- and hang-related conditions, ensuring they’re categorized with the correct severity.
  • Tests
    • Added new unit tests covering fatal, severe, and transient message patterns.
    • Added error-budget behavior checks to verify fatal patterns bypass budget consumption where expected.

@chienchunhung chienchunhung changed the title [WideEP FT] Add error classification patterns [TRTLLM-13546][WideEP FT] Add error classification patterns Jun 26, 2026
@chienchunhung chienchunhung changed the title [TRTLLM-13546][WideEP FT] Add error classification patterns [TRTLLM-13546][feat] Add error classification patterns Jun 26, 2026
@chienchunhung chienchunhung marked this pull request as ready for review June 26, 2026 22:34
@chienchunhung chienchunhung requested a review from a team as a code owner June 26, 2026 22:34
@coderabbitai

coderabbitai Bot commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

Error classification patterns are expanded for additional fatal and severe CUDA, NCCL, MPI, RDMA, and NIXL messages. A new test module covers the updated classifications and ErrorBudget.consume, and the test is added to the A10 pre-merge list.

Changes

Error classification coverage

Layer / File(s) Summary
Pattern expansion
tensorrt_llm/_torch/pyexecutor/error_classification.py
IMMEDIATE_FATAL_PATTERNS and SEVERE_ERROR_PATTERNS include additional CUDA, NCCL, MPI, RDMA, and NIXL message strings.
Test coverage
tests/unittest/_torch/pyexecutor/test_error_classification.py, tests/integration/test_lists/test-db/l0_a10.yml
A new test module loads error_classification.py, checks the expanded classifications, validates ErrorBudget.consume, and is added to the A10 pre-merge test list.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
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.
Title check ✅ Passed The title accurately summarizes the main change: adding error classification patterns for pyexecutor.
Description check ✅ Passed The PR description includes a clear summary, design scope, and test details, matching the template's required content closely enough.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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: 2

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
tests/unittest/_torch/pyexecutor/test_error_classification.py (1)

1-84: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Rerun ruff-format on the changed Python files before merge.

The current patch is blocked by pre-commit: ruff-format modified one changed Python file, so CI will keep failing until the formatter output is committed.

🤖 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 `@tests/unittest/_torch/pyexecutor/test_error_classification.py` around lines 1
- 84, The patch needs formatting cleanup because ruff-format is changing one of
the edited Python files, so the change set is not in its final committed form.
Re-run the formatter on the affected test module, especially the import block
and parameterized test definitions in test_error_classification.py, then commit
the formatted result so the pre-commit ruff-format check passes.

Source: Pipeline failures

🤖 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/_torch/pyexecutor/error_classification.py`:
- Line 39: The immediate-fatal token list in classify_error() is too broad
because the bare string "unrecoverable" can match unrelated errors and trigger
shutdown via ErrorBudget.consume() in py_executor.py. Replace that entry in the
immediate-fatal matching set with the exact emitted phrase you intend to catch,
using classify_error() and the fatal-error constants in error_classification.py
as the location to update. Keep the match specific enough to only classify the
intended WideEP failure path and avoid false positives from other libraries or
user code.

In `@tests/unittest/_torch/pyexecutor/test_error_classification.py`:
- Around line 35-60: Add direct regression coverage for the new compact literal
spellings in test_error_classification.py. The current parameterized cases in
test_wide_ep_immediate_fatal_patterns and test_wide_ep_severe_patterns cover
descriptive messages, but they do not verify the exact substrings
cudaerrorcontextisdestroyed and ncclcommabort. Add explicit message cases to
classify_error assertions so a typo in the literal lists would fail these tests.

---

Outside diff comments:
In `@tests/unittest/_torch/pyexecutor/test_error_classification.py`:
- Around line 1-84: The patch needs formatting cleanup because ruff-format is
changing one of the edited Python files, so the change set is not in its final
committed form. Re-run the formatter on the affected test module, especially the
import block and parameterized test definitions in test_error_classification.py,
then commit the formatted result so the pre-commit ruff-format check passes.
🪄 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: 83daf61e-54c7-469a-950f-5d22ff712026

📥 Commits

Reviewing files that changed from the base of the PR and between 8e6a089 and b5865b4.

📒 Files selected for processing (3)
  • tensorrt_llm/_torch/pyexecutor/error_classification.py
  • tests/integration/test_lists/test-db/l0_a10.yml
  • tests/unittest/_torch/pyexecutor/test_error_classification.py

Comment thread tensorrt_llm/_torch/pyexecutor/error_classification.py Outdated
Comment thread tests/unittest/_torch/pyexecutor/test_error_classification.py Outdated
@chienchunhung chienchunhung force-pushed the WideEP-FT/1c.1-error-classification branch 2 times, most recently from 4f6ca77 to 7b11e41 Compare June 26, 2026 22:45

@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 `@tests/unittest/_torch/pyexecutor/test_error_classification.py`:
- Around line 36-68: Coverage in test_wide_ep_immediate_fatal_patterns and the
adjacent WideEP timeout parametrization is still missing exact-message
regressions for several new literals, so add direct cases in
test_error_classification.py for the new spellings seen in
error_classification.py. Cover the specific substrings like cuda context
destroyed, mpi worker exited unexpectedly, nccl timeout, completion_flags
timeout, and both deep_ep/deepep buffer barrier hang variants, and assert they
map to the expected classifications so typos in the pattern list are caught
immediately.
🪄 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: 78899fe7-e5b1-4b53-8e77-af275445cb42

📥 Commits

Reviewing files that changed from the base of the PR and between 8e6a089 and 7b11e41.

📒 Files selected for processing (3)
  • tensorrt_llm/_torch/pyexecutor/error_classification.py
  • tests/integration/test_lists/test-db/l0_a10.yml
  • tests/unittest/_torch/pyexecutor/test_error_classification.py

Comment thread tests/unittest/_torch/pyexecutor/test_error_classification.py
@chienchunhung chienchunhung force-pushed the WideEP-FT/1c.1-error-classification branch from 7b11e41 to 331f9ee Compare June 27, 2026 00:28
@chienchunhung

Copy link
Copy Markdown
Collaborator Author

/bot run --disable-fail-fast

@chienchunhung chienchunhung changed the title [TRTLLM-13546][feat] Add error classification patterns [TRTLLM-13546][feat] Add error classification patterns (1c.1) Jun 27, 2026
@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #56159 [ run ] triggered by Bot. Commit: 331f9ee Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #56159 [ run ] completed with state SUCCESS. Commit: 331f9ee
/LLM/main/L0_MergeRequest_PR pipeline #45021 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

@chienchunhung chienchunhung force-pushed the WideEP-FT/1c.1-error-classification branch from 331f9ee to 0036127 Compare June 29, 2026 02:32
@chienchunhung

Copy link
Copy Markdown
Collaborator Author

/bot run

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #56269 [ run ] triggered by Bot. Commit: 0036127 Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #56269 [ run ] completed with state FAILURE. Commit: 0036127
/LLM/main/L0_MergeRequest_PR pipeline #45124 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

@chienchunhung chienchunhung force-pushed the WideEP-FT/1c.1-error-classification branch from 0036127 to 31adca1 Compare June 29, 2026 17:32
Signed-off-by: Chien-Chun Hung <2679986+chienchunhung@users.noreply.github.com>
@chienchunhung chienchunhung force-pushed the WideEP-FT/1c.1-error-classification branch from 31adca1 to d1da4bd Compare June 29, 2026 17:34

Copy link
Copy Markdown
Collaborator Author

/bot run

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #56433 [ run ] triggered by Bot. Commit: d1da4bd Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #56433 [ run ] completed with state SUCCESS. Commit: d1da4bd
/LLM/main/L0_MergeRequest_PR pipeline #45276 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

@chienchunhung

Copy link
Copy Markdown
Collaborator Author

/bot run --disable-fail-fast

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #56651 [ run ] triggered by Bot. Commit: d1da4bd Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #56651 [ run ] completed with state SUCCESS. Commit: d1da4bd
/LLM/main/L0_MergeRequest_PR pipeline #45476 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

Copy link
Copy Markdown
Collaborator Author

/bot run --disable-fail-fast --stage-list "DGX_H100-PyTorch-3"

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #56710 [ run ] triggered by Bot. Commit: d1da4bd Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #56710 [ run ] completed with state SUCCESS. Commit: d1da4bd
/LLM/main/L0_MergeRequest_PR pipeline #45532 (Partly Tested) completed with status: 'SUCCESS'

CI Report

Link to invocation

@chienchunhung

Copy link
Copy Markdown
Collaborator Author

/bot run --disable-fail-fast

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #56732 [ run ] triggered by Bot. Commit: d1da4bd Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #56732 [ run ] completed with state SUCCESS. Commit: d1da4bd
/LLM/main/L0_MergeRequest_PR pipeline #45552 completed with status: 'SUCCESS'

CI Report

Link to invocation

@chienchunhung chienchunhung enabled auto-merge (squash) July 2, 2026 21:22
@chienchunhung chienchunhung merged commit 08d505f into NVIDIA:main Jul 2, 2026
14 checks passed
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.

3 participants