xoscar 0.6.1__cp311-cp311-macosx_11_0_arm64.whl → 0.7.0__cp311-cp311-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.

@@ -16,12 +16,11 @@
16
16
  from __future__ import annotations
17
17
 
18
18
  import asyncio
19
- import multiprocessing
20
19
  from typing import Any, Optional
21
20
 
22
21
  from ..communication import DummyServer, gen_local_address
23
22
  from ..config import ActorPoolConfig
24
- from ..indigen.pool import MainActorPool, SubActorPool, SubpoolStatus
23
+ from ..indigen.pool import MainActorPool, SubActorPool
25
24
  from ..message import ControlMessage, ControlMessageType, new_message_id
26
25
  from ..pool import ActorPoolType
27
26
 
@@ -50,33 +49,25 @@ class TestMainActorPool(MainActorPool):
50
49
  cls,
51
50
  actor_pool_config: ActorPoolConfig,
52
51
  process_index: int,
53
- start_method: str | None = None,
52
+ start_python: str | None = None,
54
53
  ):
55
- status_queue: multiprocessing.Queue = multiprocessing.Queue()
56
- return (
57
- asyncio.create_task(
58
- cls._create_sub_pool(actor_pool_config, process_index, status_queue, 0)
59
- ),
60
- status_queue,
61
- )
54
+ return await cls._create_sub_pool_test(actor_pool_config, process_index, 0)
62
55
 
63
56
  @classmethod
64
57
  async def wait_sub_pools_ready(cls, create_pool_tasks: list[asyncio.Task]):
65
58
  addresses = []
66
59
  tasks = []
67
60
  for t in create_pool_tasks:
68
- pool_task, queue = await t
61
+ pool_task, external_addresses = await t
69
62
  tasks.append(pool_task)
70
- status = await asyncio.to_thread(queue.get)
71
- addresses.append(status.external_addresses)
63
+ addresses.append(external_addresses)
72
64
  return tasks, addresses
73
65
 
74
66
  @classmethod
75
- async def _create_sub_pool(
67
+ async def _create_sub_pool_test(
76
68
  cls,
77
69
  actor_config: ActorPoolConfig,
78
70
  process_index: int,
79
- status_queue: multiprocessing.Queue,
80
71
  main_pool_pid: int,
81
72
  ):
82
73
  pool: TestSubActorPool = await TestSubActorPool.create(
@@ -87,11 +78,9 @@ class TestMainActorPool(MainActorPool):
87
78
  }
88
79
  )
89
80
  await pool.start()
90
- status_queue.put(
91
- SubpoolStatus(status=0, external_addresses=[pool.external_address])
92
- )
93
81
  actor_config.reset_pool_external_address(process_index, [pool.external_address])
94
- await pool.join()
82
+ cur_pool_config = actor_config.get_pool_config(process_index)
83
+ return None, cur_pool_config["external_address"]
95
84
 
96
85
  def _sync_pool_config(self, actor_pool_config: ActorPoolConfig):
97
86
  # test pool does not create routers, thus can skip this step
@@ -107,7 +96,7 @@ class TestMainActorPool(MainActorPool):
107
96
  suspend_sigint: bool | None = None,
108
97
  use_uvloop: bool | None = None,
109
98
  logging_conf: dict | None = None,
110
- start_method: str | None = None,
99
+ start_python: str | None = None,
111
100
  kwargs: dict | None = None,
112
101
  ):
113
102
  external_address = (
@@ -162,12 +151,12 @@ class TestMainActorPool(MainActorPool):
162
151
  return addresses[0][0]
163
152
 
164
153
  async def kill_sub_pool(
165
- self, process: multiprocessing.Process, force: bool = False
154
+ self, process: asyncio.subprocess.Process, force: bool = False
166
155
  ):
167
- process.cancel() # type: ignore
156
+ pass
168
157
 
169
- async def is_sub_pool_alive(self, process: multiprocessing.Process):
170
- return not process.cancelled() # type: ignore
158
+ async def is_sub_pool_alive(self, process: asyncio.subprocess.Process):
159
+ return True
171
160
 
172
161
 
173
162
  class TestSubActorPool(SubActorPool):
Binary file
Binary file
xoscar/utils.py CHANGED
@@ -89,7 +89,7 @@ def wrap_exception(
89
89
  ) -> BaseException:
90
90
  """Generate an exception wraps the cause exception."""
91
91
 
92
- def __init__(self):
92
+ def __init__(self, *args, **kwargs):
93
93
  pass
94
94
 
95
95
  def __getattr__(self, item):
xoscar/virtualenv/core.py CHANGED
@@ -39,6 +39,10 @@ class VirtualEnvManager(ABC):
39
39
  def cancel_install(self):
40
40
  pass
41
41
 
42
+ @abstractmethod
43
+ def get_python_path(self) -> str | None:
44
+ pass
45
+
42
46
  @abstractmethod
43
47
  def get_lib_path(self) -> str:
44
48
  pass
xoscar/virtualenv/uv.py CHANGED
@@ -33,7 +33,7 @@ class UVVirtualEnvManager(VirtualEnvManager):
33
33
  return shutil.which("uv") is not None
34
34
 
35
35
  def create_env(self, python_path: Path | None = None) -> None:
36
- cmd = ["uv", "venv", str(self.env_path)]
36
+ cmd = ["uv", "venv", str(self.env_path), "--system-site-packages"]
37
37
  if python_path:
38
38
  cmd += ["--python", str(python_path)]
39
39
  subprocess.run(cmd, check=True)
@@ -51,12 +51,19 @@ class UVVirtualEnvManager(VirtualEnvManager):
51
51
  # Handle known pip-related kwargs
52
52
  if "index_url" in kwargs and kwargs["index_url"]:
53
53
  cmd += ["-i", kwargs["index_url"]]
54
- if "extra_index_url" in kwargs and kwargs["extra_index_url"]:
55
- cmd += ["--extra-index-url", kwargs["extra_index_url"]]
56
- if "find_links" in kwargs and kwargs["find_links"]:
57
- cmd += ["-f", kwargs["find_links"]]
58
- if "trusted_host" in kwargs and kwargs["trusted_host"]:
59
- cmd += ["--trusted-host", kwargs["trusted_host"]]
54
+ param_and_option = [
55
+ ("extra_index_url", "--extra-index-url"),
56
+ ("find_links", "-f"),
57
+ ("trusted_host", "--trusted-host"),
58
+ ]
59
+ for param, option in param_and_option:
60
+ if param in kwargs and kwargs[param]:
61
+ param_value = kwargs[param]
62
+ if isinstance(param_value, list):
63
+ for it in param_value:
64
+ cmd += [option, it]
65
+ else:
66
+ cmd += [option, param_value]
60
67
 
61
68
  self._install_process = process = subprocess.Popen(cmd)
62
69
  returncode = process.wait()
@@ -71,6 +78,11 @@ class UVVirtualEnvManager(VirtualEnvManager):
71
78
  self._install_process.terminate()
72
79
  self._install_process.wait()
73
80
 
81
+ def get_python_path(self) -> str | None:
82
+ if self.env_path.exists():
83
+ return str(self.env_path.joinpath("bin/python"))
84
+ return None
85
+
74
86
  def get_lib_path(self) -> str:
75
87
  return sysconfig.get_path("purelib", vars={"base": str(self.env_path)})
76
88
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: xoscar
3
- Version: 0.6.1
3
+ Version: 0.7.0
4
4
  Summary: Python actor framework for heterogeneous computing.
5
5
  Home-page: http://github.com/xorbitsai/xoscar
6
6
  Author: Qin Xuye
@@ -24,6 +24,7 @@ Requires-Dist: cloudpickle>=1.5.0
24
24
  Requires-Dist: psutil>=5.9.0
25
25
  Requires-Dist: tblib>=1.7.0
26
26
  Requires-Dist: packaging
27
+ Requires-Dist: click
27
28
  Requires-Dist: uvloop>=0.14.0; sys_platform != "win32"
28
29
  Requires-Dist: scipy>=1.0.0; sys_platform != "win32" or python_version >= "3.10"
29
30
  Requires-Dist: scipy<=1.9.1,>=1.0.0; sys_platform == "win32" and python_version < "3.10"
@@ -41,6 +42,7 @@ Requires-Dist: sphinx-intl>=0.9.9; extra == "dev"
41
42
  Requires-Dist: flake8>=3.8.0; extra == "dev"
42
43
  Requires-Dist: black; extra == "dev"
43
44
  Requires-Dist: uv; extra == "dev"
45
+ Requires-Dist: click; extra == "dev"
44
46
  Provides-Extra: doc
45
47
  Requires-Dist: ipython>=6.5.0; extra == "doc"
46
48
  Requires-Dist: sphinx; extra == "doc"
@@ -1,9 +1,9 @@
1
- xoscar-0.6.1.dist-info/RECORD,,
2
- xoscar-0.6.1.dist-info/WHEEL,sha256=blxD6xcJba1KnhvJi5Nf3B2hb91L0ZBhRHqICPm8T04,110
3
- xoscar-0.6.1.dist-info/top_level.txt,sha256=vYlqqY4Nys8Thm1hePIuUv8eQePdULVWMmt7lXtX_ZA,21
4
- xoscar-0.6.1.dist-info/METADATA,sha256=G1ypXuZl-ZjV48coc-vldRpkEeOq43k5BXIBowvxmo0,9076
5
- xoscar/_utils.pyx,sha256=6iqO4eTwEI-n9i39n_TKz7MWqbytMRnVNubdJ5egL6o,7279
6
- xoscar/_utils.cpython-311-darwin.so,sha256=0oBWrWtr_5js1BaBqX9SrfK_yVX3R7pc44myyiPtLDo,167488
1
+ xoscar-0.7.0.dist-info/RECORD,,
2
+ xoscar-0.7.0.dist-info/WHEEL,sha256=1Yl4xfCXx_BC0nXnlbd5xfzR2RyoNx_gSIEdv2OLRuM,137
3
+ xoscar-0.7.0.dist-info/top_level.txt,sha256=vYlqqY4Nys8Thm1hePIuUv8eQePdULVWMmt7lXtX_ZA,21
4
+ xoscar-0.7.0.dist-info/METADATA,sha256=beSTIQsGUSOi5z0cGWQdavB4uSrNCcCtZxrpaZ0IMC8,9134
5
+ xoscar/_utils.pyx,sha256=frgVQ5xGp92jBKc4PsPmjOlVsXlKeHWtTOAMfHmBaII,7380
6
+ xoscar/_utils.cpython-311-darwin.so,sha256=zY5nCC5X6kFLCLq2_Ujcd8uRItRe0CeVrYykQy2BuzM,170000
7
7
  xoscar/backend.py,sha256=is436OPkZfSpQXaoqTRVta5eoye_pp45RFgCstAk2hU,1850
8
8
  xoscar/core.pxd,sha256=I_C2ka7XryyGnnAVXUVm8xfS1gtIrCs6X-9rswgOcUU,1317
9
9
  xoscar/_version.py,sha256=ClSPrUjgGRGHIkVMQV9XQnkQ-n0akJMnq_rh819nqFE,23719
@@ -13,12 +13,12 @@ xoscar/nvutils.py,sha256=qmW4mKLU0WB2yCs198ccQOgLL02zB7Fsa-AotO3NOmg,20412
13
13
  xoscar/constants.py,sha256=QHHSREw6uWBBjQDCFqlNfTvBZgniJPGy42KSIsR8Fqw,787
14
14
  xoscar/__init__.py,sha256=0zX8kKaio3ZIrlzB79WybcravMJw1OxPWjDspTgJFyQ,1608
15
15
  xoscar/api.py,sha256=3hztPoOxg8A_mlhWyWgVP7FMXG0PATA1TP4Rbaj7A-g,13327
16
- xoscar/utils.py,sha256=jUw6OICZUPBbmS1b3GE4vLctJf6fCKXrYtLtBuK-Oqc,16483
17
- xoscar/context.cpython-311-darwin.so,sha256=XGWZfuzmTnjNz4Bbc3lbEJXCc4Zm9V1TjF3Kx7AEsoA,210080
16
+ xoscar/utils.py,sha256=MaKiW4Vphwhh8c0yoqN8G8hbJr1zXgpf49EdvmGc1ZU,16500
17
+ xoscar/context.cpython-311-darwin.so,sha256=KG9FebuOi1uyxxvJQT1HTwhTP2IBzowXui1uk5XmQss,213120
18
18
  xoscar/debug.py,sha256=9Z8SgE2WaKYQcyDo-5-DxEJQ533v7kWjrvCd28pSx3E,5069
19
19
  xoscar/libcpp.pxd,sha256=DJqBxLFOKL4iRr9Kale5UH3rbvPRD1x5bTSOPHFpz9I,1147
20
20
  xoscar/context.pyx,sha256=8CdgPnWcE9eOp3N600WgDQ03MCi8P73eUOGcfV7Zksg,10942
21
- xoscar/core.cpython-311-darwin.so,sha256=com29YaXLzT9ResYRlPJ6fJyqJmh6Njf2hDXrEGbrbg,425192
21
+ xoscar/core.cpython-311-darwin.so,sha256=bY-LxsRND2W2uAr_fyhHn5qitz8HpN01RWzMY6BJxOY,412728
22
22
  xoscar/errors.py,sha256=wBlQOKsXf0Fc4skN39tDie0YZT-VIAuLNRgoDl2pZcA,1241
23
23
  xoscar/core.pyx,sha256=phN-yYV0A0QI8WFi2jCu0nc4CnShTepfDi0V7ZrLYPY,22092
24
24
  xoscar/driver.py,sha256=498fowtJr6b3FE8FIOA_Tc1Vwx88nfZw7p0FxrML0h4,1372
@@ -32,7 +32,7 @@ xoscar/metrics/backends/prometheus/__init__.py,sha256=h_JgzSqV5lP6vQ6XX_17kE4IY4
32
32
  xoscar/metrics/backends/prometheus/prometheus_metric.py,sha256=MxoMvVrg0pOkKpkjJ0PcAuEaaEJR2FZljmPrLjQ1-oc,2050
33
33
  xoscar/metrics/backends/console/console_metric.py,sha256=y5CCtH33j3AqI5_Uhwi4mgOcAhyhb4cWv_YvR6fxcbQ,2082
34
34
  xoscar/metrics/backends/console/__init__.py,sha256=h_JgzSqV5lP6vQ6XX_17kE4IY4BRnvKta_7VLQAL1ms,581
35
- xoscar/collective/xoscar_pygloo.cpython-311-darwin.so,sha256=_g-_eIrLBIenvknD6W3vBH_5AJwF_CisQMjsGeVuDAw,1144448
35
+ xoscar/collective/xoscar_pygloo.cpython-311-darwin.so,sha256=MXGgbltKdczOvdpt8Tmo4KRG97Cz62OKHg2sbF7DqGA,1144352
36
36
  xoscar/collective/__init__.py,sha256=XsClIkO_3Jd8GDifYuAbZCmJLAo9ZqGvnjUn9iuogmU,774
37
37
  xoscar/collective/core.py,sha256=NVR-7Iaq3aDPCN6fgXcq9Ew6uFEszRwxYqmUG9FLcws,23502
38
38
  xoscar/collective/common.py,sha256=INAnISbfnRicbbbDHTqbSr9ITb89ZphH5BUkSpEdXXU,3561
@@ -46,10 +46,10 @@ xoscar/serialization/numpy.py,sha256=5Kem87CvpJmzUMp3QHk4WeHU30FoQWTJJP2SwIcaQG0
46
46
  xoscar/serialization/cuda.py,sha256=iFUEnN4SiquBIhyieyOrfw3TnKnW-tU_vYgqOxO_DrA,3758
47
47
  xoscar/serialization/scipy.py,sha256=yOEi0NB8cqQ6e2UnCZ1w006RsB7T725tIL-DM_hNcsU,2482
48
48
  xoscar/serialization/aio.py,sha256=5DySPgDxU43ec7_5Ct44-Oqt7YNSJBfuf8VdQgQlChA,4731
49
- xoscar/serialization/core.cpython-311-darwin.so,sha256=1It8ADYO7Qs4k6q6ZHJVMISn1zonVuqjFkgVQ8_jZfU,378792
49
+ xoscar/serialization/core.cpython-311-darwin.so,sha256=SMSg6dHmQiFFhKInOigFXvckKSwfvxvEoISRy5cNBZM,382472
50
50
  xoscar/serialization/core.pyx,sha256=bjR-zXGm9qersk7kYPzpjpMIxDl_Auur4BCubRfKmfA,29626
51
51
  xoscar/serialization/mlx.py,sha256=N_cvbTUBKc14XWYsPIMz4kDstyRN1DNhb4BVRgnQm8Y,1872
52
- xoscar/backends/message.cpython-311-darwin.so,sha256=YJNayEDFcFuq4L_1hRL5VL5aiYaYlKAY3ifb22Kno74,381264
52
+ xoscar/backends/message.cpython-311-darwin.so,sha256=KXnr1poVvwWggRD3_CtElKzZ4hgPNZyzxfPNNNqjvnM,368144
53
53
  xoscar/backends/config.py,sha256=4tZMiXAMMS8qQ4SX_LjONLtSQVfZTx3m-IK3EqbkYdk,5375
54
54
  xoscar/backends/allocate_strategy.py,sha256=tC1Nbq2tJohahUwd-zoRYHEDX65wyuX8tmeY45uWj_w,4845
55
55
  xoscar/backends/__init__.py,sha256=VHEBQcUWM5bj027W8EUf9PiJUAP7JoMrRw3Tsvy5ySw,643
@@ -57,14 +57,17 @@ xoscar/backends/core.py,sha256=EH-fHlV9x3bnruEHaUtGYO7osKLfLJ4AQHtuzA_mr2g,10857
57
57
  xoscar/backends/context.py,sha256=XfDPG2eDhAhE6hWBEkEsHTnyyOYN9R3houlMjAL7BFw,16329
58
58
  xoscar/backends/router.py,sha256=MVl5naz-FYf-Wla7XRn3kRxOpWV0SjKDsKNluifVA8M,10532
59
59
  xoscar/backends/message.pyx,sha256=krGVtZ1YDaZX8yWhaNHwZiudQooLvcGlw6x3Sq7jxjE,19685
60
- xoscar/backends/pool.py,sha256=OezOhvvXAV3TpODhLHmJVgqCfowb3aA_fWZKPodm8bE,61003
60
+ xoscar/backends/pool.py,sha256=nrh8qobaukkjUOOOTR9t90i-wbXlgma3TNRjvwkwmcg,60528
61
61
  xoscar/backends/indigen/backend.py,sha256=znl_fZzWGEtLH8hZ9j9Kkf0fva25jEem2_KO7I1RVvc,1612
62
+ xoscar/backends/indigen/shared_memory.py,sha256=wqbckbgnd0qNm5KzlP_hklF3F_n8fKnCehSox5uMwNs,19082
62
63
  xoscar/backends/indigen/__init__.py,sha256=tKHP5ClzedBRBpZsLRVErR3EUNbbDm4CY4u0rCFJr44,685
64
+ xoscar/backends/indigen/fate_sharing.py,sha256=3QUHwq5Cjk9oCKFUISvkqHaoxWZIaXcq8JNOetdBl-A,8655
63
65
  xoscar/backends/indigen/driver.py,sha256=VGzkacYKykegW5qhCuhx01gdgBZEKJjNIyfNCnA6Nm8,952
64
- xoscar/backends/indigen/pool.py,sha256=v0Ps79W0WyeFSt2YxCJnh7q_1dnRQmo9887gcW3pNoc,17226
66
+ xoscar/backends/indigen/pool.py,sha256=7-a_T2D_gG9MhhfkaNj2QGy7FjK06n2xwyD9Tw-rfqc,15732
67
+ xoscar/backends/indigen/__main__.py,sha256=-pfio-Y4Ogbk6lBFksH-gRatp-N6sZ7wuNc-i2YsLJc,510
65
68
  xoscar/backends/test/backend.py,sha256=nv9WFhH5Bbq4Q1HB9yfpciZBaeHT4IQAtzugBWESrUY,1263
66
69
  xoscar/backends/test/__init__.py,sha256=j2ZfD6prD9WjUxRUDC7Eq5Z7N7TkL6fFr59oNyc_vY4,682
67
- xoscar/backends/test/pool.py,sha256=TW4X6J-92Pti66103poQBNDBznX6CBD3RLOc_zixjTo,7257
70
+ xoscar/backends/test/pool.py,sha256=1MrdNnQZkeBJMYrn3NGUe1VpvsUM_HlTm3l7SSynzpo,6882
68
71
  xoscar/backends/communication/ucx.py,sha256=_Dp9Ld2MWIa1txSGMnmfYwJDT0esxS-GOd2FQ4BdHiM,19960
69
72
  xoscar/backends/communication/__init__.py,sha256=oFIg83Ga93-AhrG52TE85Z2LgpGZu1RCgQu1RWi62zQ,1063
70
73
  xoscar/backends/communication/core.py,sha256=sJeE3foRIqVPXldzYpFKHDSsabfAIFBU4JuXY4OyklY,2130
@@ -79,5 +82,5 @@ xoscar/aio/lru.py,sha256=rpXCqSLtPV5xnWtd6uDwQQFGgIPEgvmWEQDkPNUx9cM,6311
79
82
  xoscar/aio/parallelism.py,sha256=VSsjk8wP-Bw7tLeUsTyLVNgp91thjxEfE3pCrw_vF5Q,1293
80
83
  xoscar/aio/base.py,sha256=9j0f1piwfE5R5GIvV212vSD03ixdaeSzSSsO2kxJZVE,2249
81
84
  xoscar/virtualenv/__init__.py,sha256=65t9_X1DvbanNjFy366SiiWZrRTpa9SXWMXPmqayE-4,1117
82
- xoscar/virtualenv/core.py,sha256=YMN6yHoNeEc8ecbJMbZkKeWKUABK1mUZ_OYOjcbRqWs,1263
83
- xoscar/virtualenv/uv.py,sha256=l9w5JxETbW2wN8vfZR7k7aKTz4cWV4MvH06MoogBOVc,2842
85
+ xoscar/virtualenv/core.py,sha256=Ld5bSkKp8ywekGuUq61uyms5I8Hm1WdbkbLxmCw-ML0,1342
86
+ xoscar/virtualenv/uv.py,sha256=rVurn1PKlvR22Bm_F1uouIb1eMkB_wr-_29dBvMl7bo,3182
@@ -2,4 +2,5 @@ Wheel-Version: 1.0
2
2
  Generator: bdist_wheel (0.45.1)
3
3
  Root-Is-Purelib: false
4
4
  Tag: cp311-cp311-macosx_11_0_arm64
5
+ Generator: delocate 0.13.0
5
6