xoscar 0.7.8__cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl → 0.7.10__cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of xoscar might be problematic. Click here for more details.

@@ -63,8 +63,8 @@ def _shm_put_object(seq: _ShmSeq, shm: shared_memory.SharedMemory, o: object):
63
63
  assert (
64
64
  len(serialized) < _SUBPROCESS_SHM_SIZE - 8
65
65
  ), f"Serialized object {o} is too long."
66
- shm.buf[4:12] = struct.pack("<II", sys.hexversion, len(serialized))
67
- shm.buf[12 : 12 + len(serialized)] = serialized
66
+ shm.buf[4:8] = struct.pack("<I", len(serialized))
67
+ shm.buf[8 : 8 + len(serialized)] = serialized
68
68
  shm.buf[:4] = struct.pack("<I", seq)
69
69
 
70
70
 
@@ -72,12 +72,8 @@ def _shm_get_object(seq: _ShmSeq, shm: shared_memory.SharedMemory):
72
72
  recv_seq = struct.unpack("<I", shm.buf[:4])[0]
73
73
  if recv_seq != seq:
74
74
  return
75
- python_version_hex, size = struct.unpack("<II", shm.buf[4:12])
76
- if python_version_hex != sys.hexversion:
77
- raise RuntimeError(
78
- f"Python version mismatch, sender: {python_version_hex}, receiver: {sys.hexversion}"
79
- )
80
- return pickle.loads(shm.buf[12 : 12 + size])
75
+ size = struct.unpack("<I", shm.buf[4:8])[0]
76
+ return pickle.loads(shm.buf[8 : 8 + size])
81
77
 
82
78
 
83
79
  @_register_message_handler
@@ -175,6 +171,16 @@ class MainActorPool(MainActorPoolBase):
175
171
  shm = shared_memory.SharedMemory(shm_name, track=False)
176
172
  try:
177
173
  config = _shm_get_object(_ShmSeq.INIT_PARAMS, shm)
174
+ # Check Python version once.
175
+ sub_pool_python_version = config.pop("python_version", None)
176
+ if (
177
+ sub_pool_python_version is not None
178
+ and sub_pool_python_version != sys.hexversion
179
+ ):
180
+ logger.warning(
181
+ f"The sub pool is using a different Python version, you may encounter serialization issues."
182
+ f" sub pool: {sub_pool_python_version}, main pool: {sys.hexversion}"
183
+ )
178
184
  actor_config = config["actor_pool_config"]
179
185
  process_index = config["process_index"]
180
186
  main_pool_pid = config["main_pool_pid"]
@@ -276,6 +282,7 @@ class MainActorPool(MainActorPoolBase):
276
282
  "actor_pool_config": actor_pool_config,
277
283
  "process_index": process_index,
278
284
  "main_pool_pid": os.getpid(),
285
+ "python_version": sys.hexversion,
279
286
  },
280
287
  )
281
288
  cmd = [
@@ -41,8 +41,10 @@ class MLXSerislizer(Serializer):
41
41
  @buffered
42
42
  def serial(self, obj: "mx.array", context: dict): # type: ignore
43
43
  mv = memoryview(obj)
44
- header = dict(shape=mv.shape, format=mv.format)
45
- if not mv.c_contiguous:
44
+ header = dict(shape=obj.shape, format=mv.format)
45
+ # If the memoryview is a multi-dimension view, then there could
46
+ # trigger a bug of asyncio write: https://github.com/python/cpython/issues/135862
47
+ if mv.ndim > 1 or not mv.c_contiguous:
46
48
  mv = memoryview(bytes(mv))
47
49
  return (header,), [mv], True
48
50
 
xoscar/virtualenv/core.py CHANGED
@@ -63,6 +63,8 @@ class VirtualEnvManager(ABC):
63
63
  ] # Extract actual package name, e.g., "torch"
64
64
  try:
65
65
  version = importlib.metadata.version(real_pkg)
66
+ # Strip build metadata like "+cpu"
67
+ version = version.split("+")[0]
66
68
  except importlib.metadata.PackageNotFoundError:
67
69
  raise RuntimeError(
68
70
  f"System package '{real_pkg}' not found. Cannot resolve '{pkg}'."
xoscar/virtualenv/uv.py CHANGED
@@ -106,6 +106,8 @@ class UVVirtualEnvManager(VirtualEnvManager):
106
106
  cmd += [option, it]
107
107
  else:
108
108
  cmd += [option, param_value]
109
+ if kwargs.get("no_build_isolation", False):
110
+ cmd += ["--no-build-isolation"]
109
111
 
110
112
  logger.info("Installing packages via command: %s", cmd)
111
113
  if not log:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: xoscar
3
- Version: 0.7.8
3
+ Version: 0.7.10
4
4
  Summary: Python actor framework for heterogeneous computing.
5
5
  Home-page: http://github.com/xorbitsai/xoscar
6
6
  Author: Qin Xuye
@@ -48,7 +48,7 @@ xoscar/backends/indigen/__main__.py,sha256=-pfio-Y4Ogbk6lBFksH-gRatp-N6sZ7wuNc-i
48
48
  xoscar/backends/indigen/backend.py,sha256=znl_fZzWGEtLH8hZ9j9Kkf0fva25jEem2_KO7I1RVvc,1612
49
49
  xoscar/backends/indigen/driver.py,sha256=VGzkacYKykegW5qhCuhx01gdgBZEKJjNIyfNCnA6Nm8,952
50
50
  xoscar/backends/indigen/fate_sharing.py,sha256=3QUHwq5Cjk9oCKFUISvkqHaoxWZIaXcq8JNOetdBl-A,8655
51
- xoscar/backends/indigen/pool.py,sha256=8EvQ7z2cv4T3O0-AvHBwCtuKIW3F0CZURW18oy8L-Ps,16228
51
+ xoscar/backends/indigen/pool.py,sha256=t8zQ1i6Kf3JEy8EMMX7vTbKakilkn4TuxPdsxaxh27A,16573
52
52
  xoscar/backends/indigen/shared_memory.py,sha256=wqbckbgnd0qNm5KzlP_hklF3F_n8fKnCehSox5uMwNs,19082
53
53
  xoscar/backends/test/__init__.py,sha256=j2ZfD6prD9WjUxRUDC7Eq5Z7N7TkL6fFr59oNyc_vY4,682
54
54
  xoscar/backends/test/backend.py,sha256=nv9WFhH5Bbq4Q1HB9yfpciZBaeHT4IQAtzugBWESrUY,1263
@@ -76,15 +76,15 @@ xoscar/serialization/core.pyi,sha256=-pQARSj91rt3iU4ftWGFH6jYwsSKYCT_Ya7EJsaGEjg
76
76
  xoscar/serialization/core.pyx,sha256=bjR-zXGm9qersk7kYPzpjpMIxDl_Auur4BCubRfKmfA,29626
77
77
  xoscar/serialization/cuda.py,sha256=iFUEnN4SiquBIhyieyOrfw3TnKnW-tU_vYgqOxO_DrA,3758
78
78
  xoscar/serialization/exception.py,sha256=Jy8Lsk0z-VJyEUaWeuZIwkmxqaoB-nLKMa1D15Cl4js,1634
79
- xoscar/serialization/mlx.py,sha256=N_cvbTUBKc14XWYsPIMz4kDstyRN1DNhb4BVRgnQm8Y,1872
79
+ xoscar/serialization/mlx.py,sha256=o7m6L5fqi7brIgNe0-qi8zhXtiJMzGgAJXl2Zvh1q10,2050
80
80
  xoscar/serialization/numpy.py,sha256=5Kem87CvpJmzUMp3QHk4WeHU30FoQWTJJP2SwIcaQG0,2919
81
81
  xoscar/serialization/pyfury.py,sha256=sifOnVMYoS82PzZEkzkfxesmMHei23k5UAUUKUyoOYQ,1163
82
82
  xoscar/serialization/scipy.py,sha256=yOEi0NB8cqQ6e2UnCZ1w006RsB7T725tIL-DM_hNcsU,2482
83
83
  xoscar/virtualenv/__init__.py,sha256=65t9_X1DvbanNjFy366SiiWZrRTpa9SXWMXPmqayE-4,1117
84
- xoscar/virtualenv/core.py,sha256=dZqwg2IzHsLEERvohZx0rvBINopMRUImqxG3HHGO0q4,2744
84
+ xoscar/virtualenv/core.py,sha256=qHKqI6R92SN0_OWVAX1xy9wJiZr-r0VfLHTskZtZE4U,2851
85
85
  xoscar/virtualenv/utils.py,sha256=mL_uATHhj82xec0-0IZ6N8yI-laPAB4t8G3alPUGtPA,2439
86
- xoscar/virtualenv/uv.py,sha256=XCjeCEntMhA0kyZS0qG7qu9AWzPtIwdeTJRLYRIOiDI,4788
87
- xoscar-0.7.8.dist-info/METADATA,sha256=pbsh6bBcb88bP-JCBeD9eMoruw5fuzJJvtvg6jxsjwE,9189
88
- xoscar-0.7.8.dist-info/WHEEL,sha256=29GglsfgOKni3MnvXwDNoeBjBZY4LOjl_HH3QTWETk4,153
89
- xoscar-0.7.8.dist-info/top_level.txt,sha256=vYlqqY4Nys8Thm1hePIuUv8eQePdULVWMmt7lXtX_ZA,21
90
- xoscar-0.7.8.dist-info/RECORD,,
86
+ xoscar/virtualenv/uv.py,sha256=ef7InUP0VwPJe-ssZpWCMDN69lEp4aIRFtEgVff82eI,4884
87
+ xoscar-0.7.10.dist-info/METADATA,sha256=dkDaayWvZgb2xNPLSsXnZ80MI9eIR4huW9xcfCYoe9Y,9190
88
+ xoscar-0.7.10.dist-info/WHEEL,sha256=29GglsfgOKni3MnvXwDNoeBjBZY4LOjl_HH3QTWETk4,153
89
+ xoscar-0.7.10.dist-info/top_level.txt,sha256=vYlqqY4Nys8Thm1hePIuUv8eQePdULVWMmt7lXtX_ZA,21
90
+ xoscar-0.7.10.dist-info/RECORD,,