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

Add support for @nni.training_update in codegen #1564

Merged
merged 2 commits into from
Sep 30, 2019

Conversation

ultmaster
Copy link
Contributor

Fix #1560, and prettify some of the codes to conform with PEP 8.

@@ -79,7 +80,8 @@ def parse_annotation_mutable_layers(code, lineno, nas_mode):
fields['optional_inputs'] = True
elif k.id == 'optional_input_size':
assert not fields['optional_input_size'], 'Duplicated field: optional_input_size'
assert type(value) is ast.Num or type(value) is ast.List, 'Value of optional_input_size should be a number or list'
assert type(value) is ast.Num or type(
value) is ast.List, 'Value of optional_input_size should be a number or list'
Copy link
Contributor

Choose a reason for hiding this comment

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

suggest switching to a new line after ast.List,

@QuanluZhang QuanluZhang merged commit f1210a9 into microsoft:master Sep 30, 2019
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.

Inconsistent annotation parsing between codegen and specific_codegen
4 participants