Skip to content

[https://nvbugs/6143879][fix] add a fixed random seed for the test#13861

Merged
nvchenghaoz merged 2 commits into
NVIDIA:mainfrom
nv-auto-deploy:chenghao/nvbug_0507
May 7, 2026
Merged

[https://nvbugs/6143879][fix] add a fixed random seed for the test#13861
nvchenghaoz merged 2 commits into
NVIDIA:mainfrom
nv-auto-deploy:chenghao/nvbug_0507

Conversation

@nvchenghaoz
Copy link
Copy Markdown
Collaborator

@nvchenghaoz nvchenghaoz commented May 7, 2026

Ran the test 40 times locally and cannot reproduce the error. Add a fixed random seed for the test.

Summary by CodeRabbit

  • Tests
    • Enhanced determinism in FP8 BMM quantization tests for more reliable test execution.

Signed-off-by: Chenghao Zhang <211069071+nvchenghaoz@users.noreply.github.com>
@nvchenghaoz nvchenghaoz requested a review from a team as a code owner May 7, 2026 18:14
@nvchenghaoz nvchenghaoz requested a review from taylor-yb-lee May 7, 2026 18:14
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 7, 2026

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: 4bf510ca-8be6-49a7-8b51-579d48eda458

📥 Commits

Reviewing files that changed from the base of the PR and between 2f79ebb and 7c03e55.

📒 Files selected for processing (1)
  • tests/unittest/auto_deploy/singlegpu/transformations/library/test_quantization.py

📝 Walkthrough

Walkthrough

This PR adds deterministic random seeding to the test_bmm_quantization test function via torch.manual_seed(0). The seed is set before model dimensions and input construction, ensuring reproducible results for FP8 BMM quantization tests without changing any quantization logic, transforms, or assertions.

Changes

Test Determinism

Layer / File(s) Summary
Test Seed Setup
tests/unittest/auto_deploy/singlegpu/transformations/library/test_quantization.py
torch.manual_seed(0) added at the start of test_bmm_quantization to ensure deterministic model and input generation.

🎯 1 (Trivial) | ⏱️ ~2 minutes

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description is minimal and lacks required sections like detailed explanation of the issue, test coverage details, and PR checklist items specified in the template. Expand the description to include: (1) detailed explanation of why the random seed is needed, (2) which test cases validate this fix, and (3) completion of the PR checklist with explicit checkboxes.
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies the fix and the purpose: adding a fixed random seed for a test to address a specific bug.
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.

@nvchenghaoz
Copy link
Copy Markdown
Collaborator Author

/bot run --stage-list "A10-Build_Docs, A10-PackageSanityCheck-PY310-UB2204, A100X-PackageSanityCheck-PY312-UB2404, A30-AutoDeploy-1, H100_PCIe-AutoDeploy-1, DGX_B200-AutoDeploy-1, A100X-PyTorch-1"

@tensorrt-cicd
Copy link
Copy Markdown
Collaborator

PR_Github #47231 [ run ] triggered by Bot. Commit: 9707c21 Link to invocation

@tensorrt-cicd
Copy link
Copy Markdown
Collaborator

PR_Github #47231 [ run ] completed with state SUCCESS. Commit: 9707c21
/LLM/main/L0_MergeRequest_PR pipeline #37187 (Partly Tested) completed with status: 'SUCCESS'

CI Report

Link to invocation

@nvchenghaoz
Copy link
Copy Markdown
Collaborator Author

/bot skip --comment "Fix AutoDeploy unit test, since the AutoDeploy unit test passed, skip the whole pipeline"

@tensorrt-cicd
Copy link
Copy Markdown
Collaborator

PR_Github #47253 [ skip ] triggered by Bot. Commit: 9707c21 Link to invocation

@tensorrt-cicd
Copy link
Copy Markdown
Collaborator

PR_Github #47253 [ skip ] completed with state SUCCESS. Commit: 9707c21
Skipping testing for commit 9707c21

Link to invocation

@nvchenghaoz nvchenghaoz merged commit 39f938e into NVIDIA:main May 7, 2026
6 checks passed
@nvchenghaoz nvchenghaoz deleted the chenghao/nvbug_0507 branch May 12, 2026 21:04
yufeiwu-nv pushed a commit to yufeiwu-nv/TensorRT-LLM that referenced this pull request May 19, 2026
…VIDIA#13861)

Signed-off-by: Chenghao Zhang <211069071+nvchenghaoz@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