Unverified Commit 0c17e2d9 authored by chicm-ms's avatar chicm-ms Committed by GitHub
Browse files

Sdk update (#272)

* Rename get_parameters to get_next_parameter

* annotations add get_next_parameter

* updates

* updates

* updates

* updates

* updates
parent a1014619
......@@ -2,7 +2,7 @@ import time
import nni
params = nni.get_parameters()
params = nni.get_next_parameter()
print('params:', params)
x = params['x']
......
......@@ -197,7 +197,8 @@ class Transformer(ast.NodeTransformer):
return node # not an annotation, ignore it
if string.startswith('@nni.report_intermediate_result(') \
or string.startswith('@nni.report_final_result('):
or string.startswith('@nni.report_final_result(') \
or string.startswith('@nni.get_next_parameter('):
return parse_annotation(string[1:]) # expand annotation string to code
if string.startswith('@nni.variable(') \
......
......@@ -247,6 +247,7 @@ def generate_defualt_params():
if __name__ == '__main__':
"""@nni.get_next_parameter()"""
try:
main(generate_defualt_params())
except Exception as exception:
......
......@@ -161,6 +161,7 @@ def generate_default_params():
if __name__ == '__main__':
nni.get_next_parameter()
try:
params = generate_default_params()
logger.debug('params')
......
......@@ -198,6 +198,7 @@ if __name__ == '__main__':
#original_params = parse_init_json(FLAGS.init_file_path, {})
#pipe_interface.set_params_to_env()
'''@nni.get_next_parameter()'''
try:
params = generate_default_params()
logger.debug('params')
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment