Skip to content
This repository has been archived by the owner on Sep 18, 2024. It is now read-only.

Support 'op_partial_names' in config_list #4184

Merged
merged 20 commits into from
Sep 27, 2021
Merged

Conversation

Fiascolsy
Copy link
Contributor

You now could use 'op_partial_names' instead of 'op_names' in config_list

@ghost
Copy link

ghost commented Sep 15, 2021

CLA assistant check
All CLA requirements met.

}

INTERNAL_SCHEMA = {
'total_sparsity': And(float, lambda n: 0 <= n < 1),
SchemaOptional('max_sparsity_per_layer'): {str: float},
SchemaOptional('op_types'): [str],
SchemaOptional('op_names'): [str]
SchemaOptional('op_names'): [str],
SchemaOptional('op_partial_names'): [str]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

op_partial_names should not in INTERNAL_SCHEMA

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, I got it. And next I will add something in need in 'config_validation.py' as well.

@acured acured self-requested a review September 17, 2021 08:42
@Fiascolsy Fiascolsy changed the title New Feature Added Support 'op_partial_names' in config_list Sep 18, 2021
raise SchemaError('At least one of the followings must be specified: op_types, op_names or op_partial_names.')

if 'op_partial_names' in data:
if 'op_names' in data:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use and

config['op_names'].extend(op_names)
config['op_names'] = list(set(config['op_names']))
else:
config['op_names'] = config.pop('op_partial_names')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why config['op_names'] = config.pop('op_partial_names')? seems this config['op_names'] is never used.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

some legacy logic parts have crushed and I optimized this jut now : (

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants