-
Notifications
You must be signed in to change notification settings - Fork 1.8k
rename preCommand to pythonPath #3410
Changes from 5 commits
1f6f6c1
ff8d9be
9bbb6f0
f805c55
f6855db
22e8b0c
f6937a0
8c65e65
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -538,10 +538,10 @@ If `trialGpuNumber`_ is less than the length of this value, only a subset will b | |
This will be used as ``CUDA_VISIBLE_DEVICES`` environment variable. | ||
|
||
|
||
trialPrepareCommand | ||
trialPythonPath | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. what is the difference between There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. pythonPath is config v1 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. why use different names? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Just follow the previous naming way: There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. could someone explain when to use |
||
------------------- | ||
|
||
Command(s) to run before launching each trial. | ||
The path will insert to PATH before launching each trial. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please make it clear whether it's inserted at front or at tail. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done. |
||
|
||
type: ``Optional[str]`` | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,9 +24,7 @@ machineList: | |
- ip: ${replace_to_your_remote_machine_ip} | ||
username: ${replace_to_your_remote_machine_username} | ||
sshKeyPath: ${replace_to_your_remote_machine_sshKeyPath} | ||
# Pre-command will be executed before the remote machine executes other commands. | ||
# Below is an example of specifying python environment. | ||
# If you want to execute multiple commands, please use "&&" to connect them. | ||
# preCommand: source ${replace_to_absolute_path_recommended_here}/bin/activate | ||
# preCommand: source ${replace_to_conda_path}/bin/activate ${replace_to_conda_env_name} | ||
preCommand: export PATH=${replace_to_python_environment_path_in_your_remote_machine}:$PATH | ||
# Below are examples of specifying python environment. | ||
# pythonPath: /usr/bin/python3.7 | ||
# pythonPath: C:/Python37 | ||
pythonPath: ${replace_to_python_environment_path_in_your_remote_machine} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. better to add comments to show concrete path examples here There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The doc said "The path will insert to PATH before launching each trial". Is There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It is a directory, "python3.7" is a folder name..I will rename it to "yourPythonPath" to avoid the misunderstanding. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Then I suggest There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done. |
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.
How does it work? If I execute a command line tool that uses python, for example, nnictl, lightgbm, horovodrun, will it work?
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 you set this pythonPath, it will be added to the front of env PATH in current terminal, which means when you run any tool that calls python or run python directly from the terminal, this python your provided the path will be chosen first.
But it only works for current terminal which your set the pythonPath at first.