xoscar 0.7.10__cp310-cp310-macosx_11_0_arm64.whl → 0.7.11__cp310-cp310-macosx_11_0_arm64.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.

Binary file
Binary file
Binary file
@@ -40,25 +40,27 @@ dtype_map = {
40
40
  class MLXSerislizer(Serializer):
41
41
  @buffered
42
42
  def serial(self, obj: "mx.array", context: dict): # type: ignore
43
- mv = memoryview(obj)
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:
43
+ ravel_obj = obj.reshape(-1).view(mx.uint8)
44
+ mv = memoryview(ravel_obj)
45
+ header = dict(
46
+ shape=obj.shape, format=mv.format, dtype=str(obj.dtype).rsplit(".", 1)[-1]
47
+ )
48
+ if not mv.c_contiguous:
49
+ # NOTE: we only consider c contiguous here,
50
+ # MLX has no way to create f contiguous arrays.
48
51
  mv = memoryview(bytes(mv))
49
52
  return (header,), [mv], True
50
53
 
51
54
  def deserial(self, serialized: tuple, context: dict, subs: List[Any]):
52
55
  header = serialized[0]
53
- shape, format = header["shape"], header["format"]
56
+ shape, format, dtype = header["shape"], header["format"], header["dtype"]
54
57
  mv = memoryview(subs[0])
55
58
  if mv.format != format:
56
59
  dtype = dtype_map.get(format, np.uint8)
57
60
  np_arr = np.frombuffer(mv, dtype=dtype).reshape(shape) # parse
58
61
  mv = memoryview(np_arr) # recreate memoryview
59
- elif mv.shape != shape:
60
- mv = mv.cast(format, shape) # cast directly
61
- return mx.array(mv)
62
+ ravel_array = mx.array(mv)
63
+ return ravel_array.view(getattr(mx, dtype)).reshape(shape)
62
64
 
63
65
 
64
66
  if mx is not None:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: xoscar
3
- Version: 0.7.10
3
+ Version: 0.7.11
4
4
  Summary: Python actor framework for heterogeneous computing.
5
5
  Home-page: http://github.com/xorbitsai/xoscar
6
6
  Author: Qin Xuye
@@ -1,7 +1,7 @@
1
- xoscar-0.7.10.dist-info/RECORD,,
2
- xoscar-0.7.10.dist-info/WHEEL,sha256=adaOEtyuP97RoRqh2LNimBtjXokZHsp60v8dUwE5uKE,137
3
- xoscar-0.7.10.dist-info/top_level.txt,sha256=vYlqqY4Nys8Thm1hePIuUv8eQePdULVWMmt7lXtX_ZA,21
4
- xoscar-0.7.10.dist-info/METADATA,sha256=g6djQpUz02xfI-DyU0u_Rejcxt8nnZVOXeTs2wKYCPA,9135
1
+ xoscar-0.7.11.dist-info/RECORD,,
2
+ xoscar-0.7.11.dist-info/WHEEL,sha256=adaOEtyuP97RoRqh2LNimBtjXokZHsp60v8dUwE5uKE,137
3
+ xoscar-0.7.11.dist-info/top_level.txt,sha256=vYlqqY4Nys8Thm1hePIuUv8eQePdULVWMmt7lXtX_ZA,21
4
+ xoscar-0.7.11.dist-info/METADATA,sha256=PDSZhxwM8g2RzmkuPLu6aynwy5WrFKV1jyv8XVkUY_4,9135
5
5
  xoscar/_utils.pyx,sha256=frgVQ5xGp92jBKc4PsPmjOlVsXlKeHWtTOAMfHmBaII,7380
6
6
  xoscar/backend.py,sha256=is436OPkZfSpQXaoqTRVta5eoye_pp45RFgCstAk2hU,1850
7
7
  xoscar/core.pxd,sha256=I_C2ka7XryyGnnAVXUVm8xfS1gtIrCs6X-9rswgOcUU,1317
@@ -10,7 +10,7 @@ xoscar/context.pxd,sha256=qKa0OyDPZtVymftSh447m-RzFZgmz8rGqQBa7qlauvc,725
10
10
  xoscar/batch.py,sha256=DpArS0L3WYJ_HVPG-6hSYEwoAFY1mY2-mlC4Jp5M_Dw,7872
11
11
  xoscar/nvutils.py,sha256=qmW4mKLU0WB2yCs198ccQOgLL02zB7Fsa-AotO3NOmg,20412
12
12
  xoscar/constants.py,sha256=QHHSREw6uWBBjQDCFqlNfTvBZgniJPGy42KSIsR8Fqw,787
13
- xoscar/_utils.cpython-310-darwin.so,sha256=IQfQLOacD86nJTUmtU51514hQuJ4ssi4ApP2PbBwmr0,169648
13
+ xoscar/_utils.cpython-310-darwin.so,sha256=HKMVJi1DYVb9vz9Pm5paOr3pdjE7af35-Ieq7hQDOSI,169648
14
14
  xoscar/__init__.py,sha256=sy7Wtn2EuQZI0I4Az_MfsBVZm4G0DRj46qRyExgmnJk,1622
15
15
  xoscar/api.py,sha256=zxNqOjGiTIKuAip9WJ0LOoM7yevD6P5rb-sLynpZ2Zo,14648
16
16
  xoscar/utils.py,sha256=MaKiW4Vphwhh8c0yoqN8G8hbJr1zXgpf49EdvmGc1ZU,16500
@@ -20,8 +20,8 @@ xoscar/context.pyx,sha256=8CdgPnWcE9eOp3N600WgDQ03MCi8P73eUOGcfV7Zksg,10942
20
20
  xoscar/errors.py,sha256=wBlQOKsXf0Fc4skN39tDie0YZT-VIAuLNRgoDl2pZcA,1241
21
21
  xoscar/core.pyx,sha256=phN-yYV0A0QI8WFi2jCu0nc4CnShTepfDi0V7ZrLYPY,22092
22
22
  xoscar/driver.py,sha256=498fowtJr6b3FE8FIOA_Tc1Vwx88nfZw7p0FxrML0h4,1372
23
- xoscar/context.cpython-310-darwin.so,sha256=f0VulWR5XIlvfoeoZ4uGt0b4tSWp3dkMJ_PHOPqc_-o,211840
24
- xoscar/core.cpython-310-darwin.so,sha256=6ThhueBKFKHH573Q1Db0Os03GG7nxqBwk5OQ_teSJQI,409976
23
+ xoscar/context.cpython-310-darwin.so,sha256=ctsxekHPrZ-3QeHw37-nIxxrZdNnw6E72FfIv0OhMVU,211840
24
+ xoscar/core.cpython-310-darwin.so,sha256=_quvI2gfPvaqG7g1fXOubCjUNveZZt6aC8x9YlsGU6A,409976
25
25
  xoscar/profiling.py,sha256=BC5OF0HzSaXv8V7w-y-B8r5gV5DgxHFoTEIF6jCMioQ,8015
26
26
  xoscar/_utils.pxd,sha256=5KYAL3jfPdejsHnrGGT2s--ZUX5SXznQWpHVSno429k,1157
27
27
  xoscar/metrics/__init__.py,sha256=9Badi7rxYikGm2dQiNCrj9GgMRBxwuR3JaEKcFZmfak,705
@@ -47,11 +47,11 @@ xoscar/serialization/cuda.py,sha256=iFUEnN4SiquBIhyieyOrfw3TnKnW-tU_vYgqOxO_DrA,
47
47
  xoscar/serialization/scipy.py,sha256=yOEi0NB8cqQ6e2UnCZ1w006RsB7T725tIL-DM_hNcsU,2482
48
48
  xoscar/serialization/aio.py,sha256=5DySPgDxU43ec7_5Ct44-Oqt7YNSJBfuf8VdQgQlChA,4731
49
49
  xoscar/serialization/core.pyx,sha256=bjR-zXGm9qersk7kYPzpjpMIxDl_Auur4BCubRfKmfA,29626
50
- xoscar/serialization/core.cpython-310-darwin.so,sha256=o3DaIEUzNckurP2sKwphV-Rew2Llbr6kbx31VY7wt54,380296
51
- xoscar/serialization/mlx.py,sha256=o7m6L5fqi7brIgNe0-qi8zhXtiJMzGgAJXl2Zvh1q10,2050
50
+ xoscar/serialization/core.cpython-310-darwin.so,sha256=P15HPe1gThcFqw1JFNdOumWfn2SLXHEGo0LB0piiKEo,380296
51
+ xoscar/serialization/mlx.py,sha256=tRu_7o6RizdRhbr88EasHrZtShimAsLy3pIEO-by29o,2118
52
52
  xoscar/backends/config.py,sha256=4tZMiXAMMS8qQ4SX_LjONLtSQVfZTx3m-IK3EqbkYdk,5375
53
53
  xoscar/backends/allocate_strategy.py,sha256=tC1Nbq2tJohahUwd-zoRYHEDX65wyuX8tmeY45uWj_w,4845
54
- xoscar/backends/message.cpython-310-darwin.so,sha256=ZMmo4qEKrS8BVe-gevmd-isojdzjnfzX5fctjufe_Bc,349200
54
+ xoscar/backends/message.cpython-310-darwin.so,sha256=bgsD6NMUMHhlgtiIKkpGFPc2elhKCvOHV4mHolo3otw,349200
55
55
  xoscar/backends/__init__.py,sha256=VHEBQcUWM5bj027W8EUf9PiJUAP7JoMrRw3Tsvy5ySw,643
56
56
  xoscar/backends/core.py,sha256=EH-fHlV9x3bnruEHaUtGYO7osKLfLJ4AQHtuzA_mr2g,10857
57
57
  xoscar/backends/context.py,sha256=XfDPG2eDhAhE6hWBEkEsHTnyyOYN9R3houlMjAL7BFw,16329