Skip to content

Commit 046217b

Browse files
authored
Removed automatic prepending python in mlx launch (#3536)
1 parent 3ab748b commit 046217b

3 files changed

Lines changed: 2 additions & 8 deletions

File tree

.github/actions/build-macos/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ runs:
2727
DEVICE=cpu python -m unittest discover -v python/tests
2828
DEVICE=gpu METAL_DEVICE_WRAPPER_TYPE=1 METAL_DEBUG_ERROR_MODE=0 python -m unittest discover -v python/tests
2929
mpirun --bind-to none -host localhost:8 -np 8 -x DYLD_LIBRARY_PATH=/opt/homebrew/lib/ python python/tests/mpi_test_distributed.py
30-
mlx.launch --verbose -n 8 python/tests/ring_test_distributed.py -v 2> >(tee -a stderr.log >&2)
30+
mlx.launch --verbose -n 8 python python/tests/ring_test_distributed.py -v 2> >(tee -a stderr.log >&2)
3131
if $(grep "\[WARN\]" stderr.log); then echo "Distributed ring test failed"; exit 1; fi
3232
3333
- name: Build example extension

.github/actions/test-linux/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ runs:
2121
shell: bash
2222
run: |
2323
echo "::group::Distributed tests"
24-
mlx.launch --verbose -n 8 python/tests/ring_test_distributed.py -v 2> >(tee -a stderr.log >&2)
24+
mlx.launch --verbose -n 8 python python/tests/ring_test_distributed.py -v 2> >(tee -a stderr.log >&2)
2525
if grep -Fq '[WARN]' stderr.log ; then
2626
grep -F '[WARN]' stderr.log
2727
echo "Distributed ring test failed";

python/mlx/_distributed_utils/launch.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -541,12 +541,6 @@ def main():
541541
args.backend = "nccl" if mx.cuda.is_available() else "ring"
542542
args.env = hostfile.envs + args.env
543543

544-
# Check if the script is a file and convert it to a full path
545-
if (script := Path(rest[0])).exists() and script.is_file():
546-
rest[0:1] = [args.python, str(script.resolve())]
547-
elif (command := shutil.which(rest[0])) is not None:
548-
rest[0] = command
549-
550544
# Launch
551545
if args.backend == "ring":
552546
launch_ring(parser, hostfile.hosts, args, rest)

0 commit comments

Comments
 (0)