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

Commit

Permalink
add debug log for test
Browse files Browse the repository at this point in the history
  • Loading branch information
Hao Ni committed Jun 21, 2021
1 parent 4df6ce2 commit 0613e57
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions nni/tools/nnictl/launcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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
Expand All @@ -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):
Expand Down

0 comments on commit 0613e57

Please sign in to comment.