Summary
Eight Python scripts under scripts/ carry a #!/usr/bin/env python3 shebang but are not executable in the index, so the direct invocation some of them document for themselves fails with "permission denied".
Background
The scripts/ci/*.py files (and scripts/bench_mlxlm.py) are already mode 100755, so the executable convention is established. The affected files sit at 100644 despite their shebang. scripts/bench_embeddings.py:9 documents its own invocation as scripts/bench_embeddings.py --bin target/release/mlxcel-server ..., which cannot run today.
Proposed Solution
Set the executable bit in the index with git update-index --chmod=+x (or chmod +x then commit) on the shebang-carrying files. Verify with git ls-files -s scripts/**/*.py.
Implementation Notes
- Non-executable despite a shebang:
scripts/bench_embeddings.py, scripts/benchmark_gemma3n_python.py, scripts/benchmark_llama3_python.py, scripts/benchmark_python.py, scripts/bridge_overhead_microbench_py.py, scripts/gather_qmm_shape_microbench.py, scripts/layer_shaped_microbench_py.py, scripts/requantize_mlp.py (confirmed 100644 for the sampled files). - Separately,
scripts/insert_apache_header.py, scripts/tools/internlm_rope_oracle.py, and scripts/tools/quantize_mtp_drafter.py have neither a shebang nor +x. Decide whether to normalize them or leave them as python3 <file> only.
Acceptance Criteria
Original Suggestion
Title: chore(scripts): make the shebang'd Python scripts executable
Ten Python scripts under scripts/ carry a #!/usr/bin/env python3 shebang but are not executable, so the invocation some of them document for themselves fails with "permission denied". Every scripts/ci/*.py (and scripts/bench_mlxlm.py) is +x, so the convention is established.
Evidence
Non-executable despite a shebang: scripts/bench_embeddings.py, scripts/benchmark_gemma3n_python.py, scripts/benchmark_llama3_python.py, scripts/benchmark_python.py, scripts/bridge_overhead_microbench_py.py, scripts/gather_qmm_shape_microbench.py, scripts/layer_shaped_microbench_py.py, scripts/requantize_mlp.py.
scripts/bench_embeddings.py:9 documents its own invocation as scripts/bench_embeddings.py --bin target/release/mlxcel-server ..., which fails today.
Separately, scripts/insert_apache_header.py, scripts/tools/internlm_rope_oracle.py, and scripts/tools/quantize_mtp_drafter.py have neither a shebang nor +x — decide whether to bring them in line or leave them as python3 <file>-only.
Suggested fix
git update-index --chmod=+x on the shebang'd files (or chmod +x + commit). Purely mechanical; verify with git ls-files -s scripts/*.py.
Acceptance criteria
Summary
Eight Python scripts under
scripts/carry a#!/usr/bin/env python3shebang but are not executable in the index, so the direct invocation some of them document for themselves fails with "permission denied".Background
The
scripts/ci/*.pyfiles (andscripts/bench_mlxlm.py) are already mode100755, so the executable convention is established. The affected files sit at100644despite their shebang.scripts/bench_embeddings.py:9documents its own invocation asscripts/bench_embeddings.py --bin target/release/mlxcel-server ..., which cannot run today.Proposed Solution
Set the executable bit in the index with
git update-index --chmod=+x(orchmod +xthen commit) on the shebang-carrying files. Verify withgit ls-files -s scripts/**/*.py.Implementation Notes
scripts/bench_embeddings.py,scripts/benchmark_gemma3n_python.py,scripts/benchmark_llama3_python.py,scripts/benchmark_python.py,scripts/bridge_overhead_microbench_py.py,scripts/gather_qmm_shape_microbench.py,scripts/layer_shaped_microbench_py.py,scripts/requantize_mlp.py(confirmed100644for the sampled files).scripts/insert_apache_header.py,scripts/tools/internlm_rope_oracle.py, andscripts/tools/quantize_mtp_drafter.pyhave neither a shebang nor+x. Decide whether to normalize them or leave them aspython3 <file>only.Acceptance Criteria
scripts/**/*.pywith a shebang is executable in the indexOriginal Suggestion
Title: chore(scripts): make the shebang'd Python scripts executable
Ten Python scripts under
scripts/carry a#!/usr/bin/env python3shebang but are not executable, so the invocation some of them document for themselves fails with "permission denied". Everyscripts/ci/*.py(andscripts/bench_mlxlm.py) is+x, so the convention is established.Evidence
Non-executable despite a shebang:
scripts/bench_embeddings.py,scripts/benchmark_gemma3n_python.py,scripts/benchmark_llama3_python.py,scripts/benchmark_python.py,scripts/bridge_overhead_microbench_py.py,scripts/gather_qmm_shape_microbench.py,scripts/layer_shaped_microbench_py.py,scripts/requantize_mlp.py.scripts/bench_embeddings.py:9documents its own invocation asscripts/bench_embeddings.py --bin target/release/mlxcel-server ..., which fails today.Separately,
scripts/insert_apache_header.py,scripts/tools/internlm_rope_oracle.py, andscripts/tools/quantize_mtp_drafter.pyhave neither a shebang nor+x— decide whether to bring them in line or leave them aspython3 <file>-only.Suggested fix
git update-index --chmod=+xon the shebang'd files (orchmod +x+ commit). Purely mechanical; verify withgit ls-files -s scripts/*.py.Acceptance criteria
scripts/**/*.pywith a shebang is executable in the index