test: direct unit suite for model_calib CPU orchestration (42 tests)#1906
test: direct unit suite for model_calib CPU orchestration (42 tests)#1906arham766 wants to merge 2 commits into
Conversation
Hermetic CPU-only unit tests; adversarially reviewed and verified to kill seeded mutations of the target module. Part of the coverage initiative in NVIDIA#1902. Signed-off-by: arham766 <arhamislam766@yahoo.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughThis PR adds a new unit test module for ChangesModel calibration test coverage
Estimated code review effort: 2 (Simple) | ~15 minutes Possibly related issues
Suggested labels: tests, quantization Suggested reviewers: None identified. 🚥 Pre-merge checks | ✅ 6✅ Passed checks (6 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
tests/unit/torch/quantization/test_model_calib.py (1)
1-2: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valueStale copyright year in a newly-added file.
This is a new file being added in this PR, but the header states
Copyright (c) 2024. Likely copied from an older template without updating the year.✏️ Suggested fix
-# SPDX-FileCopyrightText: Copyright (c) 2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.🤖 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/unit/torch/quantization/test_model_calib.py` around lines 1 - 2, The new test file’s copyright header is stale and should be updated to the current year. In test_model_calib.py, replace the 2024 copyright year in the SPDX header with the appropriate current year so the new file matches the project’s standard for newly added sources.
🤖 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.
Nitpick comments:
In `@tests/unit/torch/quantization/test_model_calib.py`:
- Around line 1-2: The new test file’s copyright header is stale and should be
updated to the current year. In test_model_calib.py, replace the 2024 copyright
year in the SPDX header with the appropriate current year so the new file
matches the project’s standard for newly added sources.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: 494209a4-92a7-41f7-abb4-d12149944967
📒 Files selected for processing (1)
tests/unit/torch/quantization/test_model_calib.py
Signed-off-by: arham766 <arhamislam766@yahoo.com>
What does this PR do?
Type of change: new tests
Part of the unit-coverage initiative in #1902 (one PR per module; this one is self-contained). Covers: max_calibrate weight/input amax math and running-max accumulation, enable/finish stats choreography incl. use_constant_amax, tied-module single-visit, mse_calibrate refinement (asserted to genuinely differ from max), smoothquant per-channel-to-per-tensor conversion invariants, awq entry-point guards, svd properties, shared-states plumbing.
Usage
N/A — tests only.
Testing
Suite is hermetic (CPU-only, no network, deterministic, <3s) and passes locally; the full collectable tests/unit tree passes with it (1999 passed). The suite was adversarially reviewed and verified to kill seeded mutations of the target module (details in #1902).
Before your PR is "Ready for review"
Additional Information
Issue: #1902
Summary by CodeRabbit
max_calibrateaccumulation, and input activation amax consistency across batches.