-
Notifications
You must be signed in to change notification settings - Fork 1.8k
add exclude config validate in compressor #3815
Conversation
Do we have a documentation to describe the config interface of the pruner? Shall we give an example/unit test? |
@@ -3,8 +3,9 @@ | |||
|
|||
import logging | |||
import copy | |||
from nni.utils import OptimizeMode |
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.
What is OptimizeMode
for? seems not used?
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, seems a mistake, remove it.
}], model, _logger) | ||
|
||
schema.validate(config_list) | ||
for config in config_list: | ||
if 'exclude' not in config and 'sparsity' not in config: |
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.
Only when both sparsity
and op_types/op_names
exists, this config is validate, right?
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, and you reminded me this way is not elegant, modify it.
@J-shang please fix pipeline errors |
Yes, we have doc and ut, and add an exclude usecase in the example. |
No description provided.