Repository navigation
[Common] Decouple Ignored Scope and Introduce Scope Class - #4236
Merged
andrey-churkin merged 10 commits intoOct 12, 2026
Merged
andrey-churkin merged 10 commits into
andrey-churkin merged 10 commits into
Conversation
anzr299
requested review from
AlexanderDokuchaev
and
a lite review from Copilot
September 24, 2026 14:37
Contributor
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
No unresolved review issues were identified.
Review effort: Lite
Findings: None
What changed in this PR
This PR introduces a shared BaseScope to generalize scope handling and support custom annotations while preserving ignored-scope behavior.
Changes:
- Generalizes scope matching, validation, and difference utilities.
- Updates quantization, pruning, OpenVINO, and sparsification callers.
- Updates related scope tests.
| File | Description |
|---|---|
tests/common/test_scopes.py |
Updates scope difference tests. |
tests/common/test_ignored_scope.py |
Updates scope matching tests. |
src/nncf/torch/function_hook/pruning/prune_model.py |
Uses generalized node matching. |
src/nncf/scopes.py |
Adds BaseScope and generalized utilities. |
src/nncf/quantization/algorithms/weight_compression/algorithm.py |
Uses generalized scope matching. |
src/nncf/quantization/algorithms/min_max/algorithm.py |
Uses generalized scope matching. |
src/nncf/openvino/quantization/quantize_model.py |
Uses generalized scope validation. |
src/nncf/experimental/torch/sparsify_activations/target_scope.py |
Uses generalized scope utilities. |
src/nncf/experimental/torch/sparsify_activations/sparsify_activations_impl.py |
Uses generalized node matching. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
AlexanderDokuchaev
requested changes
Sep 29, 2026
AlexanderDokuchaev
requested changes
Sep 29, 2026
…lls of ignored scope to scope so deprecation warning is not shown
andrey-churkin
self-requested a review
October 1, 2026 11:04
AlexanderDokuchaev
requested changes
Oct 8, 2026
AlexanderDokuchaev
approved these changes
Oct 8, 2026
andrey-churkin
approved these changes
Oct 12, 2026
AlexanderDokuchaev
pushed a commit
to AlexanderDokuchaev/nncf
that referenced
this pull request
Oct 12, 2026
…olkit#4236) ### Changes Generalize the Ignored scope class and also the util functions for ignored scope. ### Reason for changes To support custom annotation ### Related tickets 180366 openvinotoolkit#4171 ### Tests <!--- How was the correctness of changes tested and whether new tests were added --> [Weight compression](https://github.com/openvinotoolkit/nncf/actions/runs/38215194704) - success [Test examples](https://github.com/openvinotoolkit/nncf/actions/runs/38219209741) - queued
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes
Generalize the Ignored scope class and also the util functions for ignored scope.
Reason for changes
To support custom annotation
Related tickets
180366
#4171
Tests
Weight compression - success
Test examples - success