-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Conversation
fix gpu_metrics_collector to support pyenv fix NASUI failure on dev-install-node-modules add .gitignore links for dev-install
.gitignore
Outdated
@@ -84,3 +84,8 @@ venv.bak/ | |||
|
|||
# In case you place source code in ~/nni/ | |||
/experiments | |||
src/sdk/pynni/nni/nni |
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 add these folders?
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.
They are links, and created by dev-install.
const log: Logger = getLogger(); | ||
log.debug(`remoteExeCommand: command: [${command}]`); | ||
const deferred: Deferred<RemoteCommandResult> = new Deferred<RemoteCommandResult>(); | ||
let stdout: string = ''; | ||
let stderr: string = ''; | ||
let exitCode: number; | ||
let captureStdOut = false; |
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.
what is the purpose of captureStdout
?
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.
When the shell is using user's interactive environment, there are startup outputs, like what we see when login a SSH shell. This kind of outputs won't be captured, and output.
pidList = list(map(int, pidList)) | ||
pidList.remove(os.getpid()) | ||
return not pidList | ||
else: | ||
pgrep_output = subprocess.check_output('pgrep -fxu "$(whoami)" \'python3 -m nni_gpu_tool.gpu_metrics_collector\'', shell=True) | ||
pgrep_output = subprocess.check_output( | ||
'pgrep -afu "$(whoami)" \'python3 -m nni_gpu_tool.gpu_metrics_collector\'', shell=True) |
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 use -a
instead of -x
?
`
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.
-x means exact match and -a means output command text also. It works with default Python, but if user uses multiple Python tools, like pyenv, the command line won't be exact match like this. So use a more complex filter to handle this situation.
pidList = list(map(int, pidList)) | ||
pidList.remove(os.getpid()) | ||
return not pidList | ||
else: | ||
pgrep_output = subprocess.check_output('pgrep -fxu "$(whoami)" \'python3 -m nni_gpu_tool.gpu_metrics_collector\'', shell=True) | ||
pgrep_output = subprocess.check_output( |
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.
Our line length limit is 140.
.gitignore
Outdated
@@ -84,3 +84,8 @@ venv.bak/ | |||
|
|||
# In case you place source code in ~/nni/ | |||
/experiments | |||
src/sdk/pynni/nni/nni |
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.
I think these are wrong soft links. We should investigate in why they are created.
suggest to merge into a dev branch to run integration-test-remote and integration-test-remote-windows pipelines first |
@chicm-ms |
Makefile
Outdated
@@ -211,6 +211,7 @@ dev-install-node-modules: | |||
sed -ie 's/$(NNI_VERSION_TEMPLATE)/$(NNI_VERSION_VALUE)/' $(NNI_PKG_FOLDER)/package.json | |||
ln -sf ${PWD}/src/nni_manager/node_modules $(NNI_PKG_FOLDER)/node_modules | |||
ln -sf ${PWD}/src/webui/build $(NNI_PKG_FOLDER)/static | |||
mkdir -p $(NASUI_PKG_FOLDER) | |||
ln -sf ${PWD}/src/nasui/build $(NASUI_PKG_FOLDER)/build | |||
ln -sf ${PWD}/src/nasui/server.js $(NASUI_PKG_FOLDER)/server.js |
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.
needs to remove this line, or will give
# Installing NNI Package
rm -rf /home/yann/.local/nni
ln -sf /home/yann/code/nni/src/nni_manager/dist /home/yann/.local/nni
cp src/nni_manager/package.json /home/yann/.local/nni
sed -ie 's/999.0.0-developing/v0.2-1270-g06bc964/' /home/yann/.local/nni/package.json
ln -sf /home/yann/code/nni/src/nni_manager/node_modules /home/yann/.local/nni/node_modules
ln -sf /home/yann/code/nni/src/webui/build /home/yann/.local/nni/static
mkdir -p /home/yann/.local/nni/nasui
ln -sf /home/yann/code/nni/src/nasui/build /home/yann/.local/nni/nasui/build
ln -sf /home/yann/code/nni/src/nasui/server.js /home/yann/.local/nni/nasui/server.js
ln: '/home/yann/code/nni/src/nasui/server.js' and '/home/yann/.local/nni/nasui/server.js' are the same file
Makefile:207: recipe for target 'dev-install-node-modules' failed
make: *** [dev-install-node-modules] Error 1
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.
Didn't hit this issue, and it's not changed this time.
Create #2370 as a dev branch. please continue review there. |
Add shell support for ssh connection, so that remote script can be started with user environment.
Minor fixes,
dev env test passed.