-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Conversation
What's the purpose of this change? |
@@ -46,7 +46,7 @@ class WindowsCommands extends OsCommands { | |||
} | |||
|
|||
public generateGpuStatsScript(scriptFolder: string): string { | |||
return `powershell -command $env:Path=If($env:prePath){$env:prePath}Else{$env:Path};$env:METRIC_OUTPUT_DIR='${scriptFolder}';$app = Start-Process -FilePath python -NoNewWindow -passthru -ArgumentList '-m nni.tools.gpu_tool.gpu_metrics_collector' -RedirectStandardOutput ${scriptFolder}\\scriptstdout -RedirectStandardError ${scriptFolder}\\scriptstderr;Write $PID ^| Out-File ${scriptFolder}\\pid -NoNewline -encoding utf8;wait-process $app.ID`; | |||
return `powershell -command $setEnv = Start-Job -script {$env:Path=If($env:prePath){$env:prePath}Else{$env:Path};$env:METRIC_OUTPUT_DIR='${scriptFolder}'};wait-job $setEnv;$app = Start-Process -FilePath python -NoNewWindow -passthru -ArgumentList '-m nni.tools.gpu_tool.gpu_metrics_collector' -RedirectStandardOutput ${scriptFolder}\\scriptstdout -RedirectStandardError ${scriptFolder}\\scriptstderr;Write $PID ^| Out-File ${scriptFolder}\\pid -NoNewline -encoding utf8;wait-process $app.ID`; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why need to put $env
into Start-Job
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@acured because did not finish changing environment variables before starting the gpu_metrics_collector
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To fix this issue |
preCommand: command1 && command2 && command3 | ||
|
||
**注意**:因为 ``preCommand`` 每次都会在其他命令之前执行,所以强烈建议不要设置 **preCommand** 来对系统进行更改,即 ``mkdir`` or ``touch``. | ||
pythonPath: ${replace_to_python_environment_path_in_your_remote_machine} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
don't modify the Chinese doc directly, this part will auto-update.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK
Please add eng doc. |
Done. |
Miss ExperimentConfig.rst |
Done. |
No description provided.