-
Notifications
You must be signed in to change notification settings - Fork 240
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Torch] NNCFNetwork.transformation_layout #2595
[Torch] NNCFNetwork.transformation_layout #2595
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #2595 +/- ##
============================================
- Coverage 89.84% 79.57% -10.28%
============================================
Files 494 493 -1
Lines 45374 45519 +145
============================================
- Hits 40768 36223 -4545
- Misses 4606 9296 +4690
... and 125 files with indirect coverage changes
Flags with carried forward coverage won't be shown. Click here to find out more.
|
7ae777e
to
ada7683
Compare
d8867d0
to
3c8a7de
Compare
52c098c
to
0767521
Compare
0767521
to
0eca703
Compare
d65a6b1
to
1b1e015
Compare
1b1e015
to
e5c159c
Compare
63935da
to
56b8a23
Compare
b54fe9a
to
a6abd0a
Compare
tests/torch/nncf_network/helpers.py
Outdated
), | ||
) | ||
|
||
COMMAND_CLASSES = [PTInsertionCommand, PTSharedFnInsertionCommand, PTSharedFnInsertionCommand] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unused?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I've removed it, thanks
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
8c49de4
to
6937ca0
Compare
On top of #2584 #2595 ### Changes * `serialize_transformations` and `load_transformations` functions are introduced: `serialize_transformations` could serialize `PTTransformationLayout` to a dict which could be serialized by json; serialized transformation could be recovered by the `load_transformations` function. * `StatefullTorchModuleInterface` is introduced to make it possible to serialize all compression modules for quantization, sparisification, weights compression and pruning algorithms * Quantizers are created with scale shape specified in the quantization spec ### Reason for changes * To make it possible to serialize/deserialize PT nncf transformations * To make it possible to serialize/deserialize compression modules which are the part of each transformation * To align scales shapes after `nncf.quantize` and quantizes initialization ### Related tickets 129586 ### Tests * tests/torch/test_serialization.py * tests/torch/test_serialization.py * tests/torch/test_serialization.py
On top of #2584
Changes
NNCFNetwork.transformation_layout
method is introducedReason for changes
To make it possible to collect applied transformation commands from a modified
NNCFNetwork
Related tickets
129586
Tests
TestGetAppliedModificationCommands