[object Object]

← back to Exo

exo: enable multiprocessing support in PyInstaller bundles

a24bdf76808dbf85176bc92c84d73032f3e9ce8d · 2025-12-22 19:49:12 +0000 · Jake Hillion

Model loading fails silently when running from the DMG-packaged app,
despite working correctly with `uv run exo`. The bundled app spawns
child processes for model inference via multiprocessing, but these
processes fail to start in a frozen (PyInstaller) environment.

Add `freeze_support()` which is required for multiprocessing to work
in frozen applications.

Test plan:

Hardware setup: 3x Mac Studio M3 Ultra connected all-to-all with TB5

- Built a DMG using a modified .github/workflows/build-app.yml[0] to avoid
  publishing it.
- Installed on all 3 Macs, replacing the existing Exo.
- Downloaded Llama 3.3 70B (FP16).
- Downloaded Qwen3 Coder 235B A22B (8-bit).

Things that work now but didn't on the previous app:
- Topology looks good, previously there was no discovery.

What didn't work:
- Started an instance with Pipeline + MLX Ring + 3 Nodes. Failed.
- Started an instance with Tensor + MLX RDMA + 2 Nodes. Failed.

Will continue debugging the instance starting issues separately.

[0] https://github.com/exo-explore/exo/actions/runs/20461320368

Files touched

Diff

commit a24bdf76808dbf85176bc92c84d73032f3e9ce8d
Author: Jake Hillion <jake@hillion.co.uk>
Date:   Mon Dec 22 19:49:12 2025 +0000

    exo: enable multiprocessing support in PyInstaller bundles
    
    Model loading fails silently when running from the DMG-packaged app,
    despite working correctly with `uv run exo`. The bundled app spawns
    child processes for model inference via multiprocessing, but these
    processes fail to start in a frozen (PyInstaller) environment.
    
    Add `freeze_support()` which is required for multiprocessing to work
    in frozen applications.
    
    Test plan:
    
    Hardware setup: 3x Mac Studio M3 Ultra connected all-to-all with TB5
    
    - Built a DMG using a modified .github/workflows/build-app.yml[0] to avoid
      publishing it.
    - Installed on all 3 Macs, replacing the existing Exo.
    - Downloaded Llama 3.3 70B (FP16).
    - Downloaded Qwen3 Coder 235B A22B (8-bit).
    
    Things that work now but didn't on the previous app:
    - Topology looks good, previously there was no discovery.
    
    What didn't work:
    - Started an instance with Pipeline + MLX Ring + 3 Nodes. Failed.
    - Started an instance with Tensor + MLX RDMA + 2 Nodes. Failed.
    
    Will continue debugging the instance starting issues separately.
    
    [0] https://github.com/exo-explore/exo/actions/runs/20461320368
---
 src/exo/__main__.py | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/exo/__main__.py b/src/exo/__main__.py
index 6cfe06a5..bd18145c 100644
--- a/src/exo/__main__.py
+++ b/src/exo/__main__.py
@@ -1,4 +1,7 @@
+from multiprocessing import freeze_support
+
 from exo.main import main
 
 if __name__ == "__main__":
+    freeze_support()
     main()

← e8855959 build-app: add branch trigger from named branch  ·  back to Exo  ·  feat: conform to XDG Base Directory Specification on Linux ( 70c423f5 →