From 0b15160a791b673ecf1446ef54d26d145c436688 Mon Sep 17 00:00:00 2001 From: Crysple <871886504@qq.com> Date: Tue, 25 Jun 2019 17:42:23 +0800 Subject: [PATCH] fix a bug --- tools/nni_cmd/launcher.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/nni_cmd/launcher.py b/tools/nni_cmd/launcher.py index 09c458df91..c3b4906aee 100644 --- a/tools/nni_cmd/launcher.py +++ b/tools/nni_cmd/launcher.py @@ -377,7 +377,8 @@ def launch_experiment(args, experiment_config, mode, config_file_name, experimen if not os.path.isdir(path): os.makedirs(path) path = tempfile.mkdtemp(dir=path) - code_dir = expand_annotations(experiment_config['trial']['codeDir'], path, nas_mode=experiment_config['trial']['nasMode']) + nas_mode = experiment_config['trial'].get('nasMode') + code_dir = expand_annotations(experiment_config['trial']['codeDir'], path, nas_mode) experiment_config['trial']['codeDir'] = code_dir search_space = generate_search_space(code_dir) experiment_config['searchSpace'] = json.dumps(search_space)