-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
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.