[Deprecation] Replace deprecated function usage#2632
Conversation
Signed-off-by: Kyle Sayers <kylesayrs@gmail.com>
|
👋 Hi! Thank you for contributing to llm-compressor. Please add the ready label when the PR is ready for review. Note: This is required to complete the testing suite, please only add the label once the PR is code complete and local testing has been performed. |
|
Important Review skippedAuto incremental reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
WalkthroughThe PR refactors Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Suggested labels
🚥 Pre-merge checks | ✅ 1 | ❌ 2❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (1 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@src/llmcompressor/modifiers/autoround/base.py`:
- Around line 409-411: The type annotation for the parameter
llmc_registered_qparams in _postprocess_qparams is incorrect: it's annotated as
dict[str, torch.Tensor] but the implementation accesses it as a nested mapping
(llmc_registered_qparams[name][qparam_name]); update the signature of
_postprocess_qparams to use a nested mapping type such as dict[str, dict[str,
torch.Tensor]] (or Mapping[str, Mapping[str, torch.Tensor]]) and adjust any
related type hints/usages in the surrounding code to match this nested structure
so static checkers and readers see the correct shape.
🪄 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: Pro
Run ID: 6292f65d-35df-41df-8739-85c41bd5e372
📒 Files selected for processing (1)
src/llmcompressor/modifiers/autoround/base.py
There was a problem hiding this comment.
Code Review
This pull request refactors src/llmcompressor/modifiers/autoround/base.py by replacing deprecated offload utilities with standard PyTorch operations and adding type hints. Review feedback suggests using update_offload_parameter instead of module.register_parameter to maintain compatibility with offloaded models. Additionally, the type hint for llmc_registered_qparams should be corrected to reflect its nested dictionary structure.
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> Signed-off-by: Kyle Sayers <kylesayrs@gmail.com>
|
The quality checks have failed. Please run |
brian-dellabetta
left a comment
There was a problem hiding this comment.
good once make quality / make style are run
|
The quality checks have failed. Please run |
No description provided.