Skip to content

Comments

Fix test_transformers_tp for torch 2.10 env#915

Open
kevalmorabia97 wants to merge 1 commit intomainfrom
kmorabia/torch210-tf-tp-fix
Open

Fix test_transformers_tp for torch 2.10 env#915
kevalmorabia97 wants to merge 1 commit intomainfrom
kmorabia/torch210-tf-tp-fix

Conversation

@kevalmorabia97
Copy link
Collaborator

@kevalmorabia97 kevalmorabia97 commented Feb 21, 2026

After bumping CICD dev containers to latest (with torch 2.10), test_transformers_tp.py is failing (was skpipped in PR-merge CICD as it requires 2-gpu)

Failing test: https://github.com/NVIDIA/Model-Optimizer/actions/runs/22258743173/job/64393623736#step:7:617

Passing test after this fix: https://github.com/NVIDIA/Model-Optimizer/actions/runs/22259791793/job/64396179609

Summary by CodeRabbit

  • Bug Fixes
    • Improved quantization calibration by converting outputs to local tensor representations and adding a normalization step before loss computation, ensuring more reliable and accurate model calibration results.

Signed-off-by: Keval Morabia <28916987+kevalmorabia97@users.noreply.github.com>
@kevalmorabia97 kevalmorabia97 requested a review from a team as a code owner February 21, 2026 15:58
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 21, 2026

No actionable comments were generated in the recent review. 🎉


📝 Walkthrough

Walkthrough

In the awq_lite calibration path, outputs are converted to local tensors when available before computing MSE loss, adding a normalization step without altering control flow or overall calibration behavior.

Changes

Cohort / File(s) Summary
AWQ Lite Calibration
modelopt/torch/quantization/model_calib.py
Convert outputs to local tensors in update_loss path to ensure proper tensor representation before MSE loss computation.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

🚥 Pre-merge checks | ✅ 1 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Title check ⚠️ Warning The PR title describes a test fix for torch 2.10, but the actual changes modify calibration loss computation in model_calib.py, which is unrelated to the stated objective. Update the title to accurately reflect the actual changes: e.g., 'Convert calibration outputs to local tensors in awq_lite' or verify that the correct changes are included in this PR.
Docstring Coverage ⚠️ Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (1 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

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

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch kmorabia/torch210-tf-tp-fix

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@codecov
Copy link

codecov bot commented Feb 21, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 73.10%. Comparing base (9e23c6c) to head (0af1a6f).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #915   +/-   ##
=======================================
  Coverage   73.10%   73.10%           
=======================================
  Files         205      205           
  Lines       22281    22283    +2     
=======================================
+ Hits        16288    16290    +2     
  Misses       5993     5993           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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.

1 participant