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

Commit

Permalink
Fix windows node (#1013)
Browse files Browse the repository at this point in the history
  • Loading branch information
demianzhang authored and SparkSnail committed Apr 24, 2019
1 parent ab9de20 commit a46bf0d
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions tools/nni_cmd/launcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,11 @@ def start_rest_server(port, platform, mode, config_file_name, experiment_id=None

entry_dir = get_nni_installation_path()
entry_file = os.path.join(entry_dir, 'main.js')

cmds = ['node', entry_file, '--port', str(port), '--mode', platform, '--start_mode', mode]

node_command = 'node'
if sys.platform == 'win32':
node_command = os.path.join(entry_dir[:-3], 'Scripts', 'node.exe')
cmds = [node_command, entry_file, '--port', str(port), '--mode', platform, '--start_mode', mode]
if log_dir is not None:
cmds += ['--log_dir', log_dir]
if log_level is not None:
Expand Down

0 comments on commit a46bf0d

Please sign in to comment.