Fixed MLX import blocking native Windows execution of exo. (Not Final)

This commit is contained in:
Sandesh Bharadwaj
2025-01-14 20:35:21 -05:00
parent c260689a06
commit 6737e36e23
3 changed files with 20 additions and 3 deletions

View File

@@ -21,7 +21,13 @@ from PIL import Image
import numpy as np
import base64
from io import BytesIO
import mlx.core as mx
import platform
if platform.system().lower() == "darwin" and platform.machine().lower() == "arm64":
import mlx.core as mx
else:
import numpy as mx
import tempfile
from exo.download.hf.hf_shard_download import HFShardDownloader
import shutil

View File

@@ -12,7 +12,12 @@ from exo.topology.topology import Topology
from exo.topology.device_capabilities import DeviceCapabilities, DeviceFlops
from exo.helpers import DEBUG
import json
import mlx.core as mx
import platform
if platform.system().lower() == "darwin" and platform.machine().lower() == "arm64":
import mlx.core as mx
else:
import numpy as mx
class GRPCPeerHandle(PeerHandle):
def __init__(self, _id: str, address: str, desc: str, device_capabilities: DeviceCapabilities):

View File

@@ -3,13 +3,19 @@ from concurrent import futures
import numpy as np
from asyncio import CancelledError
import platform
from . import node_service_pb2
from . import node_service_pb2_grpc
from exo import DEBUG
from exo.inference.shard import Shard
from exo.orchestration import Node
import json
import mlx.core as mx
if platform.system().lower() == "darwin" and platform.machine().lower() == "arm64":
import mlx.core as mx
else:
import numpy as mx
class GRPCServer(node_service_pb2_grpc.NodeServiceServicer):