Commit 61d47a4d authored by Deshui Yu's avatar Deshui Yu
Browse files

[Code merge] Merge code from dogfood-v1 branch

parent f1f6f880
......@@ -167,8 +167,10 @@ def validate_trail_content(experiment_config):
check_empty(experiment_config['trial'], 'trialCodeDir')
check_directory(experiment_config['trial'], 'trialCodeDir')
experiment_config['trial']['trialCodeDir'] = os.path.abspath(experiment_config['trial']['trialCodeDir'])
check_empty(experiment_config['trial'], 'trialGpuNum')
check_digit(experiment_config['trial'], 'trialGpuNum', 0, 100)
if experiment_config['trial'].get('trialGpuNum') is None:
experiment_config['trial']['trialGpuNum'] = 0
else:
check_digit(experiment_config['trial'], 'trialGpuNum', 0, 100)
def validate_machinelist_content(experiment_config):
......
......@@ -94,14 +94,14 @@ def parse_args():
parser_experiment = subparsers.add_parser('experiment', help='get experiment information')
#add subparsers for parser_experiment
parser_experiment_subparsers = parser_experiment.add_subparsers()
parser_experiment_ls = parser_experiment_subparsers.add_parser('ls', help='list experiment')
parser_experiment_ls.set_defaults(func=list_experiment)
parser_experiment_show = parser_experiment_subparsers.add_parser('show', help='show the information of experiment')
parser_experiment_show.set_defaults(func=list_experiment)
#parse config command
parser_config = subparsers.add_parser('config', help='get config information')
parser_config_subparsers = parser_config.add_subparsers()
parser_config_ls = parser_config_subparsers.add_parser('ls', help='list config')
parser_config_ls.set_defaults(func=get_config)
parser_config_show = parser_config_subparsers.add_parser('show', help='show the information of config')
parser_config_show.set_defaults(func=get_config)
#parse restful server command
parser_rest = subparsers.add_parser('rest', help='get restful server information')
......
......@@ -29,7 +29,7 @@ from .constants import STDOUT_FULL_PATH, STDERR_FULL_PATH
def start_web_ui(port):
'''start web ui'''
cmds = ['serve', '-s', '-n', '$HOME/.nni/webui', '-l', str(port)]
cmds = ['serve', '-s', '-n', '/usr/share/nni/webui', '-l', str(port)]
stdout_file = open(STDOUT_FULL_PATH, 'a+')
stderr_file = open(STDERR_FULL_PATH, 'a+')
webui_process = Popen(cmds, stdout=stdout_file, stderr=stderr_file)
......
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