From 595a4ad2060ec23edc2a9233f9f3b152751e3338 Mon Sep 17 00:00:00 2001 From: Angelos Katharopoulos Date: Wed, 10 Dec 2025 00:54:27 -0800 Subject: [PATCH] Improve interactivity of mlx.launch --- python/mlx/_distributed_utils/launch.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python/mlx/_distributed_utils/launch.py b/python/mlx/_distributed_utils/launch.py index ce807c989..f87f112d6 100644 --- a/python/mlx/_distributed_utils/launch.py +++ b/python/mlx/_distributed_utils/launch.py @@ -49,7 +49,7 @@ class RemoteProcess(CommandProcess): is_local = host == "127.0.0.1" cmd = RemoteProcess.make_launch_script(rank, cwd, files, env, command) 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._pidfile = None @@ -110,7 +110,7 @@ class RemoteProcess(CommandProcess): # Write the PID to a file so we can kill the process if needed script += "pidfile=$(mktemp); " script += "echo $$ > $pidfile; " - script += "echo $pidfile; " + script += 'printf "%s\\n" $pidfile; ' # 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.