mirror of
https://github.com/ml-explore/mlx.git
synced 2025-12-16 01:49:05 +08:00
Improve interactivity of mlx.launch
This commit is contained in:
@@ -49,7 +49,7 @@ class RemoteProcess(CommandProcess):
|
|||||||
is_local = host == "127.0.0.1"
|
is_local = host == "127.0.0.1"
|
||||||
cmd = RemoteProcess.make_launch_script(rank, cwd, files, env, command)
|
cmd = RemoteProcess.make_launch_script(rank, cwd, files, env, command)
|
||||||
if not is_local:
|
if not is_local:
|
||||||
cmd = f"ssh {host} {shlex.quote(cmd)}"
|
cmd = f"ssh -tt -o LogLevel=QUIET {host} {shlex.quote(cmd)}"
|
||||||
|
|
||||||
self._host = host
|
self._host = host
|
||||||
self._pidfile = None
|
self._pidfile = None
|
||||||
@@ -110,7 +110,7 @@ class RemoteProcess(CommandProcess):
|
|||||||
# Write the PID to a file so we can kill the process if needed
|
# Write the PID to a file so we can kill the process if needed
|
||||||
script += "pidfile=$(mktemp); "
|
script += "pidfile=$(mktemp); "
|
||||||
script += "echo $$ > $pidfile; "
|
script += "echo $$ > $pidfile; "
|
||||||
script += "echo $pidfile; "
|
script += 'printf "%s\\n" $pidfile; '
|
||||||
|
|
||||||
# Change the working directory if one was requested. Otherwise attempt to
|
# Change the working directory if one was requested. Otherwise attempt to
|
||||||
# change to the current one but don't fail if it wasn't possible.
|
# change to the current one but don't fail if it wasn't possible.
|
||||||
|
|||||||
Reference in New Issue
Block a user