Skip to content

[https://nvbugs/6337235][test] Fix MX/GMS model loader fixtures - #15471

Merged
chienchunhung merged 1 commit into
NVIDIA:mainfrom
chienchunhung:codex/nvbug-6337235-model-loader-test-fixtures
Jun 22, 2026
Merged

[https://nvbugs/6337235][test] Fix MX/GMS model loader fixtures#15471
chienchunhung merged 1 commit into
NVIDIA:mainfrom
chienchunhung:codex/nvbug-6337235-model-loader-test-fixtures

Conversation

@chienchunhung

@chienchunhung chienchunhung commented Jun 18, 2026

Copy link
Copy Markdown
Collaborator

Description

Fix stale MX/GMS ModelLoader unit-test fixtures exposed by the expanded L0 unit-test coverage.

ModelLoader.load() now builds a SourceIdentity for GMS and MX paths. These branch-focused tests stub _load_and_validate_config() with a lightweight SimpleNamespace, so the real fingerprint builder can fail before the tests reach the GMS/MX behavior they are meant to cover. This PR stubs SourceIdentity.from_model_config() in those tests with a fixed real SourceIdentity, and makes the GMS RO backend return the same identity so the strict RO gate still executes successfully.

Reference: https://nvbugs/6337235

Test Coverage

  • PYTHONPYCACHEPREFIX=/private/tmp/trtllm_pycache python3 -m py_compile tests/unittest/_torch/pyexecutor/test_model_loader_gms.py tests/unittest/_torch/pyexecutor/test_model_loader_mx.py
  • git diff --check
  • Commit hooks passed for the touched files. Skipped waive list check and validate-test-lists locally because they crash under this machine's Python 3.9 while parsing Python 3.10 union annotations in scripts/check_test_list.py.

Note: focused pytest was not runnable in this local environment because pytest is not installed for the system Python.

Summary by CodeRabbit

  • Tests
    • Enhanced model loader test coverage to verify that the source_identity parameter is correctly passed and handled throughout the loading pipeline.

@chienchunhung chienchunhung changed the title [NVBUG-6337235][test] Fix MX/GMS model loader fixtures [https://nvbugs/6337235][test] Fix MX/GMS model loader fixtures Jun 18, 2026
@chienchunhung

Copy link
Copy Markdown
Collaborator Author

/bot run --disable-fail-fast

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #54892 [ run ] triggered by Bot. Commit: 9688833 Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #54892 [ run ] completed with state FAILURE. Commit: 9688833
/LLM/main/L0_MergeRequest_PR pipeline #43896 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 codex/nvbug-6337235-model-loader-test-fixtures branch 2 times, most recently from eba3038 to 1b115c0 Compare June 21, 2026 02:51

Copy link
Copy Markdown
Collaborator Author

/bot run

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #54992 [ run ] triggered by Bot. Commit: 1b115c0 Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #54992 [ run ] completed with state SUCCESS. Commit: 1b115c0
/LLM/main/L0_MergeRequest_PR pipeline #43984 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

Link to invocation

@chienchunhung

Copy link
Copy Markdown
Collaborator Author

/bot run --disable-fail-fast

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #55009 [ run ] triggered by Bot. Commit: 1b115c0 Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #55009 [ run ] completed with state SUCCESS. Commit: 1b115c0
/LLM/main/L0_MergeRequest_PR pipeline #44001 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

Stub SourceIdentity construction in the MX/GMS ModelLoader branch tests so the tests keep focusing on branch behavior while dedicated source-identity tests cover fingerprint compatibility.

NVBUG 6337235

Signed-off-by: Chien-Chun Hung <2679986+chienchunhung@users.noreply.github.com>
@chienchunhung
chienchunhung force-pushed the codex/nvbug-6337235-model-loader-test-fixtures branch from 1b115c0 to 5ec5c41 Compare June 22, 2026 17:56

Copy link
Copy Markdown
Collaborator Author

/bot reuse-pipeline

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #55063 [ reuse-pipeline ] triggered by Bot. Commit: 5ec5c41 Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #55063 [ reuse-pipeline ] completed with state SUCCESS. Commit: 5ec5c41
Can't reuse PR_Github #55009 with status: FAILED

Link to invocation

@chienchunhung

Copy link
Copy Markdown
Collaborator Author

/bot run

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #55068 [ run ] triggered by Bot. Commit: 5ec5c41 Link to invocation

@chienchunhung
chienchunhung marked this pull request as ready for review June 22, 2026 19:05
@coderabbitai

coderabbitai Bot commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: e0530b8f-8112-4b1b-bdd9-6d5eb46ba525

📥 Commits

Reviewing files that changed from the base of the PR and between eddaa3a and 5ec5c41.

📒 Files selected for processing (2)
  • tests/unittest/_torch/pyexecutor/test_model_loader_gms.py
  • tests/unittest/_torch/pyexecutor/test_model_loader_mx.py

📝 Walkthrough

Walkthrough

Two test files for ModelLoader (GMS and MX variants) are updated to introduce a shared _SOURCE_IDENTITY stub, monkeypatch SourceIdentity.from_model_config during loader construction, and extend checkpoint_loader.load_weights call assertions to verify the source_identity keyword argument is passed correctly.

Changes

source_identity plumbing in ModelLoader tests

Layer / File(s) Summary
GMS test: _SOURCE_IDENTITY fixture, loader wiring, and load_weights assertion
tests/unittest/_torch/pyexecutor/test_model_loader_gms.py
Adds a module-level _SOURCE_IDENTITY constant, patches SourceIdentity.from_model_config in _make_loader, wires backend.get_source_identity() to return it, and updates the RW-branch load_weights assertion to include source_identity=loader._source_identity.
MX test: _SOURCE_IDENTITY fixture, loader wiring, and load_weights assertion
tests/unittest/_torch/pyexecutor/test_model_loader_mx.py
Introduces a parallel _SOURCE_IDENTITY stub with fixed fingerprints, patches SourceIdentity.from_model_config in _make_loader, and extends the MX success test to assert load_weights receives source_identity=loader._source_identity.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~5 minutes

Possibly related PRs

  • NVIDIA/TensorRT-LLM#14878: Directly introduces the SourceIdentity gate feature that this PR's test changes mock and assert against, including the source_identity parameter passed into checkpoint_loader.load_weights.

Suggested reviewers

  • pcastonguay
  • brb-nv
  • galletas1712
  • Funatiq
  • symphonylyh
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and specifically describes the main change: fixing stale MX/GMS ModelLoader test fixtures, using proper NVBugs reference format and [fix] type.
Description check ✅ Passed The PR description adequately explains the issue, root cause, and solution. Test coverage section lists verification steps performed. PR Checklist is incomplete but not required for this fix-focused change.
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.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

@chienchunhung
chienchunhung enabled auto-merge (squash) June 22, 2026 21:10
@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #55068 [ run ] completed with state SUCCESS. Commit: 5ec5c41
/LLM/main/L0_MergeRequest_PR pipeline #44055 completed with status: 'SUCCESS'

CI Report

Link to invocation

@chienchunhung
chienchunhung merged commit 9ed7ce4 into NVIDIA:main Jun 22, 2026
12 checks passed
xinhe-nv pushed a commit to tensorrt-cicd/TensorRT-LLM that referenced this pull request Jun 23, 2026
…IA#15471)

Signed-off-by: Chien-Chun Hung <2679986+chienchunhung@users.noreply.github.com>
Signed-off-by: GitLab CI Bot <gitlab-ci@nvidia.com>
xinhe-nv pushed a commit to tensorrt-cicd/TensorRT-LLM that referenced this pull request Jun 23, 2026
…IA#15471)

Signed-off-by: Chien-Chun Hung <2679986+chienchunhung@users.noreply.github.com>
Signed-off-by: GitLab CI Bot <gitlab-ci@nvidia.com>
xinhe-nv pushed a commit to tensorrt-cicd/TensorRT-LLM that referenced this pull request Jun 24, 2026
…IA#15471)

Signed-off-by: Chien-Chun Hung <2679986+chienchunhung@users.noreply.github.com>
Signed-off-by: GitLab CI Bot <gitlab-ci@nvidia.com>
BrianLi23 pushed a commit to BrianLi23/TensorRT-LLM that referenced this pull request Jul 9, 2026
…IA#15471)

Signed-off-by: Chien-Chun Hung <2679986+chienchunhung@users.noreply.github.com>
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