xoscar 0.6.1__cp39-cp39-win_amd64.whl → 0.7.0__cp39-cp39-win_amd64.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):
xoscar/collective/uv.dll CHANGED
Binary file
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,16 +1,16 @@
1
1
  xoscar/__init__.py,sha256=dlwtB7dnDp5WME6CZVQY7d9lk1yJ9s___H5UxjGlAd4,1668
2
- xoscar/_utils.cp39-win_amd64.pyd,sha256=ytFpzTkxz_hlcOXyu1W4vausTvV_2LH8GlS2EPgXQk8,118272
2
+ xoscar/_utils.cp39-win_amd64.pyd,sha256=iU-psWQOoaz8z6L4O_06u7QubzHmRadAsuEq2fQidzo,111104
3
3
  xoscar/_utils.pxd,sha256=rlNbTg5lhXA-jCOLksqF4jhUlNn0xw2jx1HxdLa34pc,1193
4
- xoscar/_utils.pyx,sha256=18MUutw6M8Het9FcnrDMjexiJ3zxYljpTNRiYKGD-Jw,7524
4
+ xoscar/_utils.pyx,sha256=TWScgqmJGYzjbWBOShBLkq07ldfYEQ5fw6V4OytX_IA,7626
5
5
  xoscar/_version.py,sha256=bsfCVAo_o9LkiP3AjPsP4SRRqhjuS0t4D1WGJPzbdls,24412
6
6
  xoscar/api.py,sha256=B5oXv4vgMxMteh1YNaBmNFDrUFmYa_dCdzfaWwwZnCo,13820
7
7
  xoscar/backend.py,sha256=8G5JwjoOT6Q2slb11eXNApxgcmvNQUCdQzkoIMDwLcQ,1917
8
8
  xoscar/batch.py,sha256=Jk5BSpvMFAV9DrRy0a9tgPvIo_dt8cbJReZBL0cnOPc,8128
9
9
  xoscar/constants.py,sha256=GJ1KEOxwnqksc9K_GH42TSWpQECeC6ti3KJmE3PUcTw,810
10
- xoscar/context.cp39-win_amd64.pyd,sha256=JBKo0rZNBSZobajE8z9DMFFzRaMurZQUbusmIq9NDi4,159232
10
+ xoscar/context.cp39-win_amd64.pyd,sha256=PdBrdDNWQTDh4xUQ1HyrqC5eKdZoGY7oGu0uYNGQcGY,155136
11
11
  xoscar/context.pxd,sha256=6n6IAbmArSRq8EjcsbS6npW8xP1jI0qOoS1fF0oyj-o,746
12
12
  xoscar/context.pyx,sha256=FOJVerGOvxe2USryXEQA0rpaFX_ScxISH6QWKUcahY8,11310
13
- xoscar/core.cp39-win_amd64.pyd,sha256=p0CxpsJbdJDTazvcI4y45BnapCcLanpQ_Rw5rOcVvxk,337920
13
+ xoscar/core.cp39-win_amd64.pyd,sha256=TAQ7ytkJYL9-WG7CbBun7N59rxrFH5FXweqQJQwMzzc,306176
14
14
  xoscar/core.pxd,sha256=9IZP7dYGfnF1I-obIls8R8b6forxDOPbiM3v5nVslLk,1368
15
15
  xoscar/core.pyx,sha256=U6jCZN74MQHi7HkQRaVGm_w5q-FMsw0nnE3aU6533_Q,22756
16
16
  xoscar/debug.py,sha256=hrmxIH6zvTKasQo6PUUgXu5mgEsR0g87Fvpw7CoHipg,5257
@@ -19,7 +19,7 @@ xoscar/errors.py,sha256=hfIAlYuSVfB3dAQYr8hTLAMmfy5en6Y8mihdtw1gTEE,1304
19
19
  xoscar/libcpp.pxd,sha256=XGy887HXdRsvF47s-A7PvHX6Gaf15d_azRscWJY0Hc8,1178
20
20
  xoscar/nvutils.py,sha256=z6RCVs0sgKFm55TTgAYG3qy5f_AKJzjcH2kcRB-wTJQ,21129
21
21
  xoscar/profiling.py,sha256=LUqkj6sSxaFj0ltS7Yk2kFsh5ieHY417xypTYHwQOb4,8275
22
- xoscar/utils.py,sha256=wiDLdRUi4hgdrKVehzDMVRpym8oEcbdpo900o3BpoMM,17000
22
+ xoscar/utils.py,sha256=lYZWgnyTLL3vowzJ37ycPPPeaxQPhunGsYadRc0sAaM,17017
23
23
  xoscar/aio/__init__.py,sha256=ZLJlVJJH5EhItKD6tLTBri-4FV4kT1O2qdIfBC-df98,691
24
24
  xoscar/aio/base.py,sha256=ytknTCjTjNQbTM7l7QGXqPYYUkD7qq-zVBGVZ34L1Tc,2335
25
25
  xoscar/aio/file.py,sha256=x1wrvDgtTFMv-6gjSPpBU26jAO5uEAlXGGnFtx7uevQ,1545
@@ -30,9 +30,9 @@ xoscar/backends/allocate_strategy.py,sha256=DzvTlixwzTANURI2mDLHm3vcaugSPDxU6UQZ
30
30
  xoscar/backends/config.py,sha256=86j0g_Xrl8ENPzBWi296yWg9QEcljvdKK-yJbfYTvQ0,5532
31
31
  xoscar/backends/context.py,sha256=qWwksx8JxYcKR-LQA3PvXh4ReuuTTEyDaLbjpxGXcTA,16766
32
32
  xoscar/backends/core.py,sha256=fbekAxys_t1Dv7if-1R6uVvC_yAxNkXLeQ1V1ZSAfC0,11161
33
- xoscar/backends/message.cp39-win_amd64.pyd,sha256=RKtn6H5pwS15ACjwganUQwO__VuKTD6DHBAVRx6cqjA,284672
33
+ xoscar/backends/message.cp39-win_amd64.pyd,sha256=UOef1yZVqozJ9F5JfMwAP4SWOlC0qzLyzYzA6frPagY,248832
34
34
  xoscar/backends/message.pyx,sha256=lBEjMJv4VyxmeO9lHXJJazOajbFnTLak4PSBcLoPZvU,20331
35
- xoscar/backends/pool.py,sha256=XFij5l9FCbMC1isXp4tpr6YsZVxf4GfpIRfwn-nhCGE,62638
35
+ xoscar/backends/pool.py,sha256=bS_m8XBkfQQsCOaLEzM6HkV5e78dPPp1bCH6yjvPEss,62153
36
36
  xoscar/backends/router.py,sha256=EjfNpQUrhFU15eYe1kRPueziHgI2gfDViUzm7ruvXDE,10817
37
37
  xoscar/backends/communication/__init__.py,sha256=i0RWfN_no-xwlzLUl8Av8zZqVWxfgBaT2qbUvOLt37s,1093
38
38
  xoscar/backends/communication/base.py,sha256=wmWTeE4lcB_ohqyJJ6MdzMGcrOqy2RSKRp8y-NDuFdY,7736
@@ -43,19 +43,22 @@ xoscar/backends/communication/socket.py,sha256=Ecg30cXzTxtbg7GrcUHC_1fLrLMsHNdae
43
43
  xoscar/backends/communication/ucx.py,sha256=SQh461aiqdKKZe9fC4sDroFO2FmtQ_vX0oKSQjnqoFA,20498
44
44
  xoscar/backends/communication/utils.py,sha256=F-muF5_ow9JzAPAZ3d8XaGDiz3bRZOdWmWBDwQOVLe0,3761
45
45
  xoscar/backends/indigen/__init__.py,sha256=Khr2aGbaIw_04NIdY7QNhdljCKbmmzLb4NeAOM3LF8M,701
46
+ xoscar/backends/indigen/__main__.py,sha256=VeHSoiqCRyx9QMFO4Bnsiblhrn63qKY604Fv476ziVk,529
46
47
  xoscar/backends/indigen/backend.py,sha256=cCMkZDEKuRQlFb6v79JvWi5lfzsvAafznOeEWlw7CWY,1663
47
48
  xoscar/backends/indigen/driver.py,sha256=uLPBAxG7q8ds6yc-baeYUWu_m4K1gST3_BPqkfnlarw,978
48
- xoscar/backends/indigen/pool.py,sha256=KU36v_Co2sujDiOGhX2I4TZ7kgmDr1Zga8co7uW88TA,17711
49
+ xoscar/backends/indigen/fate_sharing.py,sha256=r1U5hJ1tVOQa-ncCcX731LKbHon1i-WQdxcqwLX5sOQ,8876
50
+ xoscar/backends/indigen/pool.py,sha256=-QTv73H21eXFHOp5pFt7F09-E9sAcZDfnxeO9eEjXew,16182
51
+ xoscar/backends/indigen/shared_memory.py,sha256=bfRKIvmtnUmkx9zhgwEMFO-in082Eb-YO2txFeFvhIY,19630
49
52
  xoscar/backends/test/__init__.py,sha256=xgE4hbD3g46G1GDJEeozaXIk57XaahmFMNQsnRzRcrs,698
50
53
  xoscar/backends/test/backend.py,sha256=Q4C6TFQzZogjugGmPh3QZw4IigL8VGCFOJ5fKkE1Uvk,1301
51
- xoscar/backends/test/pool.py,sha256=Eg_P--ErTwd2EowpZZg9BMhAG9UBOfXEHVhEId3OqPw,7465
54
+ xoscar/backends/test/pool.py,sha256=gh9Q7ml8XSCZS7EB5FSTwJdVesYMXRuvyS6HefWrF1U,7079
52
55
  xoscar/collective/__init__.py,sha256=3tTgFXALDbAwmEDtmBX7PN7N6ZrcPFC4evMXMIhBtsg,801
53
56
  xoscar/collective/common.py,sha256=9c7xq3IOUvfA0I9GnpalUqXZOzmF6IEILv4zL64BYVE,3663
54
57
  xoscar/collective/core.py,sha256=191aPxbUgWpjzrqyozndImDAQhZFmqoQdBkHFLDfXN0,24239
55
58
  xoscar/collective/process_group.py,sha256=kTPbrLMJSGhqbiWvTIiz-X3W0rZWd_CFn_zUIlXbOlM,23286
56
59
  xoscar/collective/utils.py,sha256=p3WEVtXvnVhkuO5mRgQBhBRFr1dKHcDKMjrbMyuiyfg,1219
57
- xoscar/collective/uv.dll,sha256=RQCaM3lMwDJk_fyPNUBW74O7_9nxS_HpitHAal3lwo8,620544
58
- xoscar/collective/xoscar_pygloo.cp39-win_amd64.pyd,sha256=ms2_jjmEbaTzh3dXZOkEH0TKu7YZB161XJA7bw7SD7o,783360
60
+ xoscar/collective/uv.dll,sha256=A-QBNU_1Ee76ZMllC2nRAxWFFuWuXxhVrqYMHWBxP4o,620544
61
+ xoscar/collective/xoscar_pygloo.cp39-win_amd64.pyd,sha256=OZQgaHiqaIiMbK2yrOwxMx-AtjgTeYNs0KtGuUA-bKY,783360
59
62
  xoscar/metrics/__init__.py,sha256=RjXuuYw4I2YYgD8UY2Z5yCZk0Z56xMJ1n40O80Dtxf8,726
60
63
  xoscar/metrics/api.py,sha256=dtJ4QrIqQNXhJedeqOPs4TXKgrRGZFFN50xAd9SCfec,9144
61
64
  xoscar/metrics/backends/__init__.py,sha256=ZHepfhCDRuK9yz4pAM7bjpWDvS3Ijp1YgyynoUFLeuU,594
@@ -66,7 +69,7 @@ xoscar/metrics/backends/prometheus/__init__.py,sha256=ZHepfhCDRuK9yz4pAM7bjpWDvS
66
69
  xoscar/metrics/backends/prometheus/prometheus_metric.py,sha256=65hb8O3tmsEJ7jgOrIwl_suj9SE5Tmqcfjuk0urkLvE,2120
67
70
  xoscar/serialization/__init__.py,sha256=tS8C49yrW_geWNEsbgW3phK1q4YN1ojI6CN-vroIFYM,876
68
71
  xoscar/serialization/aio.py,sha256=7YLXgkWpQ3ANy-TZ1qO8Mt4_J3cZFhFh2FEgUgxMT60,4873
69
- xoscar/serialization/core.cp39-win_amd64.pyd,sha256=MsgZeC9LTukfxAAyksAf_qfUies6yLzG8R0o_srpM7g,299008
72
+ xoscar/serialization/core.cp39-win_amd64.pyd,sha256=RgXiQjLlhAtdNnmX8NMLJJgCuoZR7G2dUJlAr57olEM,269824
70
73
  xoscar/serialization/core.pxd,sha256=X-47bqBM2Kzw5SkLqICdKD0gU6CpmLsBxC3kfW--wVk,1013
71
74
  xoscar/serialization/core.pyx,sha256=ZKexLRnRwZXXn2045kR7xfM_szcoPNrDuouQCWtpFp8,30570
72
75
  xoscar/serialization/cuda.py,sha256=Fj4Cpr_YmkGceUCo0mQn8fRvmHP_5WcLdRx6epZ3RC0,3869
@@ -76,9 +79,9 @@ xoscar/serialization/numpy.py,sha256=C6WVx-Sdl2OHBAvVY34DFjAKXlekMbpc2ni6bR8wxYo
76
79
  xoscar/serialization/pyfury.py,sha256=3ucal29Hr7PX9_1SfB2x43FE2xw_C0rLkVv3foL7qwM,1200
77
80
  xoscar/serialization/scipy.py,sha256=9ph-yoRoNiwUZTwQrn35U60VPirWlncXNAg6EXvqMR4,2554
78
81
  xoscar/virtualenv/__init__.py,sha256=rhJ7I6x7aXjKOCzSqsKLwqFJMh4YC2sqchEIJNEfI58,1151
79
- xoscar/virtualenv/core.py,sha256=pk6Pcv2Aewk1d-oTau1wyP80p8McIi7DodWL9PcDg1Q,1311
80
- xoscar/virtualenv/uv.py,sha256=xNNjv8Ywkwx6I1B_yQr8nkEUgJbIFNaseUCzWIo41nY,2921
81
- xoscar-0.6.1.dist-info/METADATA,sha256=7Qhpj9UNCrGu-3Sgfg2VW9QLaJNr5R_bzZDnlNKkkBE,9300
82
- xoscar-0.6.1.dist-info/WHEEL,sha256=yA7mxgqX2UV73NtJdMh2AAmdb628loM81912H3s5r00,100
83
- xoscar-0.6.1.dist-info/top_level.txt,sha256=vYlqqY4Nys8Thm1hePIuUv8eQePdULVWMmt7lXtX_ZA,21
84
- xoscar-0.6.1.dist-info/RECORD,,
82
+ xoscar/virtualenv/core.py,sha256=FeLmheIkQk0JOayVdUBEMyltAQhidQqbHguCMTHB0Sw,1394
83
+ xoscar/virtualenv/uv.py,sha256=v1LvpxtUu2ja4Cy2EqD-BGxb8zZle5Zj-91QPZH_C10,3273
84
+ xoscar-0.7.0.dist-info/METADATA,sha256=fdIFMff170aAaqB_-FtVAsSaDampWmkFBR8DdY2qb-8,9360
85
+ xoscar-0.7.0.dist-info/WHEEL,sha256=yA7mxgqX2UV73NtJdMh2AAmdb628loM81912H3s5r00,100
86
+ xoscar-0.7.0.dist-info/top_level.txt,sha256=vYlqqY4Nys8Thm1hePIuUv8eQePdULVWMmt7lXtX_ZA,21
87
+ xoscar-0.7.0.dist-info/RECORD,,
File without changes