From 01a91dd638340d4cc2bae8dc2093614dcfa96290 Mon Sep 17 00:00:00 2001 From: Hao Ni Date: Mon, 21 Jun 2021 12:17:44 +0800 Subject: [PATCH] add debug log for test --- nni/tools/nnictl/launcher.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/nni/tools/nnictl/launcher.py b/nni/tools/nnictl/launcher.py index 5a32806c4b0..24f2591a99d 100644 --- a/nni/tools/nnictl/launcher.py +++ b/nni/tools/nnictl/launcher.py @@ -302,7 +302,6 @@ def set_experiment_v1(experiment_config, mode, port, config_file_name): request_data['clusterMetaData'].append( {'key': 'trial_config', 'value': experiment_config['trial']}) response = rest_post(experiment_url(port), json.dumps(request_data), REST_TIME_OUT, show_error=True) - print_normal(json.dumps(request_data)) if check_response(response): return response else: @@ -311,12 +310,11 @@ def set_experiment_v1(experiment_config, mode, port, config_file_name): with open(stderr_full_path, 'a+') as fout: fout.write(json.dumps(json.loads(response.text), indent=4, sort_keys=True, separators=(',', ':'))) print_error('Setting experiment error, error message is {}'.format(response.text)) - print_error(response.text) - print_error(response.status_code) return None def set_experiment_v2(experiment_config, mode, port, config_file_name): '''Call startExperiment (rest POST /experiment) with yaml file content''' + print_normal(json.dumps(experiment_config)) response = rest_post(experiment_url(port), json.dumps(experiment_config), REST_TIME_OUT, show_error=True) if check_response(response): return response @@ -326,6 +324,8 @@ def set_experiment_v2(experiment_config, mode, port, config_file_name): with open(stderr_full_path, 'a+') as fout: fout.write(json.dumps(json.loads(response.text), indent=4, sort_keys=True, separators=(',', ':'))) print_error('Setting experiment error, error message is {}'.format(response.text)) + print_error(response.text) + print_error(response.status_code) return None def set_platform_config(platform, experiment_config, port, config_file_name, rest_process):