xoscar 0.2.1__cp310-cp310-win_amd64.whl → 0.3.1__cp310-cp310-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.

xoscar/__init__.py CHANGED
@@ -50,7 +50,6 @@ from ._utils import create_actor_ref
50
50
 
51
51
  # make sure methods are registered
52
52
  from .backends import indigen, test
53
- from .entrypoints import init_extension_entrypoints
54
53
  from . import _version
55
54
 
56
55
  del indigen, test
@@ -59,6 +58,3 @@ _T = TypeVar("_T")
59
58
  ActorRefType = Union[ActorRef, _T]
60
59
 
61
60
  __version__ = _version.get_versions()["version"]
62
-
63
- init_extension_entrypoints()
64
- del init_extension_entrypoints
Binary file
@@ -97,9 +97,9 @@ class DummyServer(Server):
97
97
  else tuple()
98
98
  )
99
99
 
100
- _address_to_instances: weakref.WeakValueDictionary[
101
- str, "DummyServer"
102
- ] = weakref.WeakValueDictionary()
100
+ _address_to_instances: weakref.WeakValueDictionary[str, "DummyServer"] = (
101
+ weakref.WeakValueDictionary()
102
+ )
103
103
  _channels: list[ChannelType]
104
104
  _tasks: list[asyncio.Task]
105
105
  scheme: str | None = "dummy"
@@ -26,7 +26,7 @@ from ..context import BaseActorContext
26
26
  from ..core import ActorRef, BufferRef, FileObjectRef, create_local_actor_ref
27
27
  from ..debug import debug_async_timeout, detect_cycle_send
28
28
  from ..errors import CannotCancelTask
29
- from ..utils import dataslots
29
+ from ..utils import dataslots, fix_all_zero_ip
30
30
  from .allocate_strategy import AddressSpecified, AllocateStrategy
31
31
  from .communication import Client, DummyClient, UCXClient
32
32
  from .core import ActorCaller
@@ -187,6 +187,7 @@ class IndigenActorContext(BaseActorContext):
187
187
 
188
188
  async def actor_ref(self, *args, **kwargs):
189
189
  actor_ref = create_actor_ref(*args, **kwargs)
190
+ connect_addr = actor_ref.address
190
191
  local_actor_ref = create_local_actor_ref(actor_ref.address, actor_ref.uid)
191
192
  if local_actor_ref is not None:
192
193
  return local_actor_ref
@@ -195,7 +196,10 @@ class IndigenActorContext(BaseActorContext):
195
196
  )
196
197
  future = await self._call(actor_ref.address, message, wait=False)
197
198
  result = await self._wait(future, actor_ref.address, message)
198
- return self._process_result_message(result)
199
+ res = self._process_result_message(result)
200
+ if res.address != connect_addr:
201
+ res.address = fix_all_zero_ip(res.address, connect_addr)
202
+ return res
199
203
 
200
204
  async def send(
201
205
  self,
xoscar/backends/core.py CHANGED
@@ -85,7 +85,8 @@ class ActorCaller:
85
85
  f"Remote server {client.dest_address} closed"
86
86
  ) from None
87
87
  future = self._client_to_message_futures[client].pop(message.message_id)
88
- future.set_result(message)
88
+ if not future.done():
89
+ future.set_result(message)
89
90
  except DeserializeMessageFailed as e:
90
91
  message_id = e.message_id
91
92
  future = self._client_to_message_futures[client].pop(message_id)
@@ -187,14 +187,19 @@ class MainActorPool(MainActorPoolBase):
187
187
  def start_pool_in_process():
188
188
  ctx = multiprocessing.get_context(method=start_method)
189
189
  status_queue = ctx.Queue()
190
+ main_pool_pid = os.getpid()
190
191
 
191
192
  with _suspend_init_main():
192
193
  process = ctx.Process(
193
194
  target=cls._start_sub_pool,
194
- args=(actor_pool_config, process_index, status_queue),
195
+ args=(
196
+ actor_pool_config,
197
+ process_index,
198
+ status_queue,
199
+ main_pool_pid,
200
+ ),
195
201
  name=f"IndigenActorPool{process_index}",
196
202
  )
197
- process.daemon = True
198
203
  process.start()
199
204
 
200
205
  # wait for sub actor pool to finish starting
@@ -209,15 +214,22 @@ class MainActorPool(MainActorPoolBase):
209
214
 
210
215
  @classmethod
211
216
  async def wait_sub_pools_ready(cls, create_pool_tasks: List[asyncio.Task]):
212
- processes = []
217
+ processes: list[multiprocessing.Process] = []
213
218
  ext_addresses = []
219
+ error = None
214
220
  for task in create_pool_tasks:
215
221
  process, status = await task
222
+ processes.append(process)
216
223
  if status.status == 1:
217
224
  # start sub pool failed
218
- raise status.error.with_traceback(status.traceback)
219
- processes.append(process)
220
- ext_addresses.append(status.external_addresses)
225
+ error = status.error.with_traceback(status.traceback)
226
+ else:
227
+ ext_addresses.append(status.external_addresses)
228
+ if error:
229
+ for p in processes:
230
+ # error happens, kill all subprocesses
231
+ p.kill()
232
+ raise error
221
233
  return processes, ext_addresses
222
234
 
223
235
  @classmethod
@@ -226,6 +238,7 @@ class MainActorPool(MainActorPoolBase):
226
238
  actor_config: ActorPoolConfig,
227
239
  process_index: int,
228
240
  status_queue: multiprocessing.Queue,
241
+ main_pool_pid: int,
229
242
  ):
230
243
  ensure_coverage()
231
244
 
@@ -259,7 +272,9 @@ class MainActorPool(MainActorPoolBase):
259
272
  else:
260
273
  asyncio.set_event_loop(asyncio.new_event_loop())
261
274
 
262
- coro = cls._create_sub_pool(actor_config, process_index, status_queue)
275
+ coro = cls._create_sub_pool(
276
+ actor_config, process_index, status_queue, main_pool_pid
277
+ )
263
278
  asyncio.run(coro)
264
279
 
265
280
  @classmethod
@@ -268,6 +283,7 @@ class MainActorPool(MainActorPoolBase):
268
283
  actor_config: ActorPoolConfig,
269
284
  process_index: int,
270
285
  status_queue: multiprocessing.Queue,
286
+ main_pool_pid: int,
271
287
  ):
272
288
  process_status = None
273
289
  try:
@@ -276,7 +292,11 @@ class MainActorPool(MainActorPoolBase):
276
292
  if env:
277
293
  os.environ.update(env)
278
294
  pool = await SubActorPool.create(
279
- {"actor_pool_config": actor_config, "process_index": process_index}
295
+ {
296
+ "actor_pool_config": actor_config,
297
+ "process_index": process_index,
298
+ "main_pool_pid": main_pool_pid,
299
+ }
280
300
  )
281
301
  external_addresses = cur_pool_config["external_address"]
282
302
  process_status = SubpoolStatus(
@@ -342,14 +362,14 @@ class MainActorPool(MainActorPoolBase):
342
362
  def start_pool_in_process():
343
363
  ctx = multiprocessing.get_context(method=start_method)
344
364
  status_queue = ctx.Queue()
365
+ main_pool_pid = os.getpid()
345
366
 
346
367
  with _suspend_init_main():
347
368
  process = ctx.Process(
348
369
  target=self._start_sub_pool,
349
- args=(self._config, process_index, status_queue),
370
+ args=(self._config, process_index, status_queue, main_pool_pid),
350
371
  name=f"IndigenActorPool{process_index}",
351
372
  )
352
- process.daemon = True
353
373
  process.start()
354
374
 
355
375
  # wait for sub actor pool to finish starting
Binary file
xoscar/backends/pool.py CHANGED
@@ -27,11 +27,12 @@ import traceback
27
27
  from abc import ABC, ABCMeta, abstractmethod
28
28
  from typing import Any, Callable, Coroutine, Optional, Type, TypeVar
29
29
 
30
+ import psutil
31
+
30
32
  from .._utils import TypeDispatcher, create_actor_ref, to_binary
31
33
  from ..api import Actor
32
34
  from ..core import ActorRef, BufferRef, FileObjectRef, register_local_pool
33
35
  from ..debug import debug_async_timeout, record_message_trace
34
- from ..entrypoints import init_extension_entrypoints
35
36
  from ..errors import (
36
37
  ActorAlreadyExist,
37
38
  ActorNotExist,
@@ -186,8 +187,6 @@ class AbstractActorPool(ABC):
186
187
  self._asyncio_task_timeout_detector_task = (
187
188
  register_asyncio_task_timeout_detector()
188
189
  )
189
- # load third party extensions.
190
- init_extension_entrypoints()
191
190
  # init metrics
192
191
  metric_configs = self._config.get_metric_configs()
193
192
  metric_backend = metric_configs.get("backend")
@@ -821,7 +820,8 @@ SubProcessHandle = multiprocessing.Process
821
820
 
822
821
 
823
822
  class SubActorPoolBase(ActorPoolBase):
824
- __slots__ = ("_main_address",)
823
+ __slots__ = ("_main_address", "_watch_main_pool_task")
824
+ _watch_main_pool_task: Optional[asyncio.Task]
825
825
 
826
826
  def __init__(
827
827
  self,
@@ -834,6 +834,7 @@ class SubActorPoolBase(ActorPoolBase):
834
834
  config: ActorPoolConfig,
835
835
  servers: list[Server],
836
836
  main_address: str,
837
+ main_pool_pid: Optional[int],
837
838
  ):
838
839
  super().__init__(
839
840
  process_index,
@@ -846,6 +847,26 @@ class SubActorPoolBase(ActorPoolBase):
846
847
  servers,
847
848
  )
848
849
  self._main_address = main_address
850
+ if main_pool_pid:
851
+ self._watch_main_pool_task = asyncio.create_task(
852
+ self._watch_main_pool(main_pool_pid)
853
+ )
854
+ else:
855
+ self._watch_main_pool_task = None
856
+
857
+ async def _watch_main_pool(self, main_pool_pid: int):
858
+ main_process = psutil.Process(main_pool_pid)
859
+ while not self.stopped:
860
+ try:
861
+ await asyncio.to_thread(main_process.status)
862
+ await asyncio.sleep(0.1)
863
+ continue
864
+ except (psutil.NoSuchProcess, ProcessLookupError, asyncio.CancelledError):
865
+ # main pool died
866
+ break
867
+
868
+ if not self.stopped:
869
+ await self.stop()
849
870
 
850
871
  async def notify_main_pool_to_destroy(
851
872
  self, message: DestroyActorMessage
@@ -900,14 +921,22 @@ class SubActorPoolBase(ActorPoolBase):
900
921
 
901
922
  @staticmethod
902
923
  def _parse_config(config: dict, kw: dict) -> dict:
924
+ main_pool_pid = config.pop("main_pool_pid", None)
903
925
  kw = AbstractActorPool._parse_config(config, kw)
904
926
  pool_config: ActorPoolConfig = kw["config"]
905
927
  main_process_index = pool_config.get_process_indexes()[0]
906
928
  kw["main_address"] = pool_config.get_pool_config(main_process_index)[
907
929
  "external_address"
908
930
  ][0]
931
+ kw["main_pool_pid"] = main_pool_pid
909
932
  return kw
910
933
 
934
+ async def stop(self):
935
+ await super().stop()
936
+ if self._watch_main_pool_task:
937
+ self._watch_main_pool_task.cancel()
938
+ await self._watch_main_pool_task
939
+
911
940
 
912
941
  class MainActorPoolBase(ActorPoolBase):
913
942
  __slots__ = (
@@ -55,7 +55,7 @@ class TestMainActorPool(MainActorPool):
55
55
  status_queue: multiprocessing.Queue = multiprocessing.Queue()
56
56
  return (
57
57
  asyncio.create_task(
58
- cls._create_sub_pool(actor_pool_config, process_index, status_queue)
58
+ cls._create_sub_pool(actor_pool_config, process_index, status_queue, 0)
59
59
  ),
60
60
  status_queue,
61
61
  )
@@ -77,9 +77,14 @@ class TestMainActorPool(MainActorPool):
77
77
  actor_config: ActorPoolConfig,
78
78
  process_index: int,
79
79
  status_queue: multiprocessing.Queue,
80
+ main_pool_pid: int,
80
81
  ):
81
82
  pool: TestSubActorPool = await TestSubActorPool.create(
82
- {"actor_pool_config": actor_config, "process_index": process_index}
83
+ {
84
+ "actor_pool_config": actor_config,
85
+ "process_index": process_index,
86
+ "main_pool_pid": main_pool_pid,
87
+ }
83
88
  )
84
89
  await pool.start()
85
90
  status_queue.put(
@@ -55,30 +55,30 @@ class AllReduceAlgorithm(IntEnum):
55
55
 
56
56
 
57
57
  TypeMappingGloo: Dict[Type[np.dtype], "xp.GlooDataType_t"] = {
58
- np.int8: xp.GlooDataType_t.glooInt8,
59
- np.uint8: xp.GlooDataType_t.glooUint8,
60
- np.int32: xp.GlooDataType_t.glooInt32,
61
- np.uint32: xp.GlooDataType_t.glooUint32,
62
- np.int64: xp.GlooDataType_t.glooInt64,
63
- np.uint64: xp.GlooDataType_t.glooUint64,
64
- np.float16: xp.GlooDataType_t.glooFloat16,
65
- np.float32: xp.GlooDataType_t.glooFloat32,
66
- np.float64: xp.GlooDataType_t.glooFloat64,
58
+ np.int8: xp.GlooDataType_t.glooInt8, # type: ignore
59
+ np.uint8: xp.GlooDataType_t.glooUint8, # type: ignore
60
+ np.int32: xp.GlooDataType_t.glooInt32, # type: ignore
61
+ np.uint32: xp.GlooDataType_t.glooUint32, # type: ignore
62
+ np.int64: xp.GlooDataType_t.glooInt64, # type: ignore
63
+ np.uint64: xp.GlooDataType_t.glooUint64, # type: ignore
64
+ np.float16: xp.GlooDataType_t.glooFloat16, # type: ignore
65
+ np.float32: xp.GlooDataType_t.glooFloat32, # type: ignore
66
+ np.float64: xp.GlooDataType_t.glooFloat64, # type: ignore
67
67
  }
68
68
  cupy = lazy_import("cupy")
69
69
  if cupy is not None:
70
70
  from cupy.cuda import nccl
71
71
 
72
72
  TypeMappingNCCL: Dict[Type[np.dtype], int] = {
73
- np.int8: nccl.NCCL_INT8,
74
- np.uint8: nccl.NCCL_UINT8,
75
- np.int32: nccl.NCCL_INT32,
76
- np.uint32: nccl.NCCL_UINT32,
77
- np.int64: nccl.NCCL_INT64,
78
- np.uint64: nccl.NCCL_UINT64,
79
- np.float16: nccl.NCCL_FLOAT16,
80
- np.float32: nccl.NCCL_FLOAT32,
81
- np.float64: nccl.NCCL_FLOAT64,
73
+ np.int8: nccl.NCCL_INT8, # type: ignore
74
+ np.uint8: nccl.NCCL_UINT8, # type: ignore
75
+ np.int32: nccl.NCCL_INT32, # type: ignore
76
+ np.uint32: nccl.NCCL_UINT32, # type: ignore
77
+ np.int64: nccl.NCCL_INT64, # type: ignore
78
+ np.uint64: nccl.NCCL_UINT64, # type: ignore
79
+ np.float16: nccl.NCCL_FLOAT16, # type: ignore
80
+ np.float32: nccl.NCCL_FLOAT32, # type: ignore
81
+ np.float64: nccl.NCCL_FLOAT64, # type: ignore
82
82
  }
83
83
 
84
84
  ReduceOpMappingNCCL: Dict[CollectiveReduceOp, int] = {
xoscar/collective/uv.dll CHANGED
Binary file
Binary file
Binary file
xoscar/utils.py CHANGED
@@ -462,3 +462,41 @@ def is_windows():
462
462
 
463
463
  def is_linux():
464
464
  return sys.platform.startswith("linux")
465
+
466
+
467
+ def is_v4_zero_ip(ip_port_addr: str) -> bool:
468
+ return ip_port_addr.startswith("0.0.0.0:")
469
+
470
+
471
+ def is_v6_zero_ip(ip_port_addr: str) -> bool:
472
+ # tcp6 addr ":::123", ":: means all zero"
473
+ arr = ip_port_addr.split(":")
474
+ if len(arr) <= 2: # Not tcp6 or udp6
475
+ return False
476
+ for part in arr[0:-1]:
477
+ if part != "":
478
+ if int(part, 16) != 0:
479
+ return False
480
+ return True
481
+
482
+
483
+ def fix_all_zero_ip(remote_addr: str, connect_addr: str) -> str:
484
+ """
485
+ Use connect_addr to fix ActorRef.address return by remote server.
486
+ When remote server listen on "0.0.0.0:port" or ":::port", it will return ActorRef.address set to listening addr,
487
+ it cannot be use by client for the following interaction unless we fix it.
488
+ (client will treat 0.0.0.0 as 127.0.0.1)
489
+
490
+ NOTE: Server might return a different addr from a pool for load-balance purpose.
491
+ """
492
+ if remote_addr == connect_addr:
493
+ return remote_addr
494
+ if not is_v4_zero_ip(remote_addr) and not is_v6_zero_ip(remote_addr):
495
+ # Remote server returns on non-zero ip
496
+ return remote_addr
497
+ if is_v4_zero_ip(connect_addr) or is_v6_zero_ip(connect_addr):
498
+ # Client connect to local server
499
+ return remote_addr
500
+ remote_port = remote_addr.split(":")[-1]
501
+ connect_ip = ":".join(connect_addr.split(":")[0:-1]) # Remote the port
502
+ return f"{connect_ip}:{remote_port}"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: xoscar
3
- Version: 0.2.1
3
+ Version: 0.3.1
4
4
  Summary: Python actor framework for heterogeneous computing.
5
5
  Home-page: http://github.com/xorbitsai/xoscar
6
6
  Author: Qin Xuye
@@ -18,11 +18,12 @@ Classifier: Programming Language :: Python :: 3.11
18
18
  Classifier: Programming Language :: Python :: Implementation :: CPython
19
19
  Classifier: Topic :: Software Development :: Libraries
20
20
  Description-Content-Type: text/markdown
21
- Requires-Dist: numpy >=1.14.0
21
+ Requires-Dist: numpy <2.0.0,>=1.14.0
22
22
  Requires-Dist: pandas >=1.0.0
23
23
  Requires-Dist: cloudpickle >=1.5.0
24
24
  Requires-Dist: psutil >=5.9.0
25
25
  Requires-Dist: tblib >=1.7.0
26
+ Requires-Dist: packaging
26
27
  Requires-Dist: pickle5 ; python_version < "3.8"
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"
@@ -1,5 +1,5 @@
1
- xoscar/__init__.py,sha256=MfWK519G_Rs8z-zkT5HdrEfJcPa6p6vqU5uvdTJTH5Y,1785
2
- xoscar/_utils.cp310-win_amd64.pyd,sha256=5u3oQt5rakHTXs0lE8JMtiOm6NM1Sm6pLSM5L9oDgAE,116224
1
+ xoscar/__init__.py,sha256=dlwtB7dnDp5WME6CZVQY7d9lk1yJ9s___H5UxjGlAd4,1668
2
+ xoscar/_utils.cp310-win_amd64.pyd,sha256=mbQ_uRPPddtMeBgCRGZnobPoRQR0MCl6ZlRKq7R5_Vo,116736
3
3
  xoscar/_utils.pxd,sha256=rlNbTg5lhXA-jCOLksqF4jhUlNn0xw2jx1HxdLa34pc,1193
4
4
  xoscar/_utils.pyx,sha256=5Wvind3AQ3JaMK7Zv9SjhiPO6LEol2hW7_fMncn69go,7300
5
5
  xoscar/_version.py,sha256=bsfCVAo_o9LkiP3AjPsP4SRRqhjuS0t4D1WGJPzbdls,24412
@@ -7,20 +7,19 @@ 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=H9ntCahBz5nKO-A6rkrGKy4WB2kNaLZAytkDajKIXqM,780
10
- xoscar/context.cp310-win_amd64.pyd,sha256=cQRUj9OwVeCFCAoPRZ4K36Ycuy77VfKQh5lUdSej2-Y,157696
10
+ xoscar/context.cp310-win_amd64.pyd,sha256=5hXA2zdhx7rM7MZrnnH7G8ffiaM1NmqQrJqRkkGI-qs,158208
11
11
  xoscar/context.pxd,sha256=6n6IAbmArSRq8EjcsbS6npW8xP1jI0qOoS1fF0oyj-o,746
12
12
  xoscar/context.pyx,sha256=FOJVerGOvxe2USryXEQA0rpaFX_ScxISH6QWKUcahY8,11310
13
- xoscar/core.cp310-win_amd64.pyd,sha256=xNFkSVrQ2EsB3zxN8UL0vgrZvTldIeCleIC2oDUv7ac,333312
13
+ xoscar/core.cp310-win_amd64.pyd,sha256=qQ551rj53on2_-R_pcaefYpDWO03sKyQs2FkfebGmA0,334848
14
14
  xoscar/core.pxd,sha256=dGv62H92PFG98SVILuF641kY-NWFEt1FYqqOX3WY5RQ,1330
15
15
  xoscar/core.pyx,sha256=0YvJW2AHgymyfsAlPGvIFw65J5gTKO3PK2p1wl4VlJ0,22388
16
16
  xoscar/debug.py,sha256=hrmxIH6zvTKasQo6PUUgXu5mgEsR0g87Fvpw7CoHipg,5257
17
17
  xoscar/driver.py,sha256=EjZ7HkdSgwtE9pXGiJXXwgWfxaIn10eZyqKpBhelaoc,1414
18
- xoscar/entrypoints.py,sha256=BOFOyMIeH3LwRCqonP6-HJGXp1gUdOrHX64KnpAFxjI,1684
19
18
  xoscar/errors.py,sha256=hfIAlYuSVfB3dAQYr8hTLAMmfy5en6Y8mihdtw1gTEE,1304
20
19
  xoscar/libcpp.pxd,sha256=XGy887HXdRsvF47s-A7PvHX6Gaf15d_azRscWJY0Hc8,1178
21
20
  xoscar/nvutils.py,sha256=z6RCVs0sgKFm55TTgAYG3qy5f_AKJzjcH2kcRB-wTJQ,21129
22
21
  xoscar/profiling.py,sha256=LUqkj6sSxaFj0ltS7Yk2kFsh5ieHY417xypTYHwQOb4,8275
23
- xoscar/utils.py,sha256=gLZeaF51zYJuea_0NWbkf4wlSVp81uUno3oQ2LkIxhc,15136
22
+ xoscar/utils.py,sha256=ENwjm_ImxD3fA-3FP4qERYv7XuDnB0xvySDjM2LHQug,16578
24
23
  xoscar/aio/__init__.py,sha256=pkMRxXvvUy_aedqw53aIi6ZS0kb7SCoNLjN9HXUQKIk,834
25
24
  xoscar/aio/_threads.py,sha256=-cfEFZUzx5j_3d7M0ub2FQaVZ8MrOG2UVo5ugucEmMY,1348
26
25
  xoscar/aio/base.py,sha256=ytknTCjTjNQbTM7l7QGXqPYYUkD7qq-zVBGVZ34L1Tc,2335
@@ -30,16 +29,16 @@ xoscar/aio/parallelism.py,sha256=egpScbxggXzAdc_evLsNmUyHafuxu62JWAYS-2ISSuI,133
30
29
  xoscar/backends/__init__.py,sha256=g9OllTquu9MRB5nySVoyiRv2z-_OSALWrOhwt7L9WXc,657
31
30
  xoscar/backends/allocate_strategy.py,sha256=DzvTlixwzTANURI2mDLHm3vcaugSPDxU6UQZb89KH0U,5005
32
31
  xoscar/backends/config.py,sha256=7nmvU_19zYR7n-bT8BNasbjntwmobmMiM7wN7O6Lujc,5129
33
- xoscar/backends/context.py,sha256=zhOFZk_RPLaJ9a8ZDQBHcV54E6r3-VnLVO-D3pIr1qA,15685
34
- xoscar/backends/core.py,sha256=4eMQ5a0-_wYs4OhOWuRIZoBojhMhj7wr6qzo2dqXFSg,7582
35
- xoscar/backends/message.cp310-win_amd64.pyd,sha256=wznGfg3YLNKcK_EmjLXP1J6WeLoo99zZIEbXXwRMLEg,262144
32
+ xoscar/backends/context.py,sha256=NukXzBwq9ZwuiN1y6RE1hfNGsW589hDtJAVwu-DV9E0,15874
33
+ xoscar/backends/core.py,sha256=bVQxM1E4qMq1-SkfrZM1aolNg1WQv2sHcZxWI1ETyMM,7625
34
+ xoscar/backends/message.cp310-win_amd64.pyd,sha256=4iUvPe4kukYN03VvFKSACbMbp44qe4Hm8xBnap4G27Y,264704
36
35
  xoscar/backends/message.pyx,sha256=kD_bqaApizHtMzqH0Baw5GH3N7r26NwOGoVfm7KCXWg,18203
37
- xoscar/backends/pool.py,sha256=9FBNhiIOu3LJCP6hIkvPKfjvHqgRDQ4Sf1mwrcb9fmk,59720
36
+ xoscar/backends/pool.py,sha256=_PtJn9AHYLwmEqk1FYaNO4_3mQo_AK79UsRS5P3a_RE,60742
38
37
  xoscar/backends/router.py,sha256=GJpSV_LhzINHdTp5jtsMHfPNMkNb1KI-WlqGqhwApGU,7953
39
38
  xoscar/backends/communication/__init__.py,sha256=Z0_RJkPGwLJeapSNt-TiO9DvnpBPu8P4PCooLaAqjkk,1080
40
39
  xoscar/backends/communication/base.py,sha256=wmWTeE4lcB_ohqyJJ6MdzMGcrOqy2RSKRp8y-NDuFdY,7736
41
40
  xoscar/backends/communication/core.py,sha256=ZM_fU0yokoPzXcJ6j-89llp2r7J9pl3gE5iImn4b4bE,2199
42
- xoscar/backends/communication/dummy.py,sha256=kTNwYhHyhfzoRifaxHH7av_CnauGfCrcuFgGc-GvqhE,8038
41
+ xoscar/backends/communication/dummy.py,sha256=apbkfFdVWqeqc8Cc1LInOw6ikVoFWixTwBN__djxgBY,8040
43
42
  xoscar/backends/communication/errors.py,sha256=-O6ZaKs6Gz7g_ZnKU2wrz8D9btowqaYuQ9u0zCYSLWo,743
44
43
  xoscar/backends/communication/socket.py,sha256=jTdU_BUD3x2s0GpJBsI_52WZubBBprzp-X0RC6bzixQ,12194
45
44
  xoscar/backends/communication/ucx.py,sha256=lo_E3M9z7prFsZV2HvuyLwKATKHVQSIKzhXXZlL4NQs,19787
@@ -47,17 +46,17 @@ xoscar/backends/communication/utils.py,sha256=F-muF5_ow9JzAPAZ3d8XaGDiz3bRZOdWmW
47
46
  xoscar/backends/indigen/__init__.py,sha256=Khr2aGbaIw_04NIdY7QNhdljCKbmmzLb4NeAOM3LF8M,701
48
47
  xoscar/backends/indigen/backend.py,sha256=cCMkZDEKuRQlFb6v79JvWi5lfzsvAafznOeEWlw7CWY,1663
49
48
  xoscar/backends/indigen/driver.py,sha256=uLPBAxG7q8ds6yc-baeYUWu_m4K1gST3_BPqkfnlarw,978
50
- xoscar/backends/indigen/pool.py,sha256=29-gpn-dbLkumhW4GtndX2xu6s3u3ZmgASDveICRg1s,16571
49
+ xoscar/backends/indigen/pool.py,sha256=sFspDW6gbcd7f7MGBaU1LwmNr48RK39XZUg0Q8oJ5us,17178
51
50
  xoscar/backends/test/__init__.py,sha256=xgE4hbD3g46G1GDJEeozaXIk57XaahmFMNQsnRzRcrs,698
52
51
  xoscar/backends/test/backend.py,sha256=Q4C6TFQzZogjugGmPh3QZw4IigL8VGCFOJ5fKkE1Uvk,1301
53
- xoscar/backends/test/pool.py,sha256=XVRdlC0fnWVWDmK75opcLqVTRtGtzeLAEV5tKfiSEfg,7334
52
+ xoscar/backends/test/pool.py,sha256=Eg_P--ErTwd2EowpZZg9BMhAG9UBOfXEHVhEId3OqPw,7465
54
53
  xoscar/collective/__init__.py,sha256=3tTgFXALDbAwmEDtmBX7PN7N6ZrcPFC4evMXMIhBtsg,801
55
- xoscar/collective/common.py,sha256=CBikMogIBIqe0U_bhomEPM2fNywthumFea3KuA9hB2U,3375
54
+ xoscar/collective/common.py,sha256=9c7xq3IOUvfA0I9GnpalUqXZOzmF6IEILv4zL64BYVE,3663
56
55
  xoscar/collective/core.py,sha256=Rx1niJ_6rznLG9varP53oqTH_bZabRzgbuP2V6JPu54,24235
57
56
  xoscar/collective/process_group.py,sha256=kTPbrLMJSGhqbiWvTIiz-X3W0rZWd_CFn_zUIlXbOlM,23286
58
57
  xoscar/collective/utils.py,sha256=p3WEVtXvnVhkuO5mRgQBhBRFr1dKHcDKMjrbMyuiyfg,1219
59
- xoscar/collective/uv.dll,sha256=AiB2_AdFgqWq1zXogmzSr1qQcHnzIKfuFRGwbTUk2aU,618496
60
- xoscar/collective/xoscar_pygloo.cp310-win_amd64.pyd,sha256=wmykjHeQfaYxDgnQCrCjzUtSxP9g9RPELL8cYje0Bvo,844288
58
+ xoscar/collective/uv.dll,sha256=RJQyG76gBI_n74hnC_2WSgXaUH6XchtE1srlrq35g58,620544
59
+ xoscar/collective/xoscar_pygloo.cp310-win_amd64.pyd,sha256=68kSLd8Lz8abR8ZGAlfWzysivJWS_FVayv_spLeIvto,845824
61
60
  xoscar/metrics/__init__.py,sha256=RjXuuYw4I2YYgD8UY2Z5yCZk0Z56xMJ1n40O80Dtxf8,726
62
61
  xoscar/metrics/api.py,sha256=dtJ4QrIqQNXhJedeqOPs4TXKgrRGZFFN50xAd9SCfec,9144
63
62
  xoscar/metrics/backends/__init__.py,sha256=ZHepfhCDRuK9yz4pAM7bjpWDvS3Ijp1YgyynoUFLeuU,594
@@ -68,7 +67,7 @@ xoscar/metrics/backends/prometheus/__init__.py,sha256=ZHepfhCDRuK9yz4pAM7bjpWDvS
68
67
  xoscar/metrics/backends/prometheus/prometheus_metric.py,sha256=65hb8O3tmsEJ7jgOrIwl_suj9SE5Tmqcfjuk0urkLvE,2120
69
68
  xoscar/serialization/__init__.py,sha256=NOAn046vnHEkx--82BKNinV8EpyOfT5hqfRBGnKl56s,866
70
69
  xoscar/serialization/aio.py,sha256=bL31B2lwrEKA5nztRSeSgDyqsbBN6dCMr6rHwNDGAIk,4715
71
- xoscar/serialization/core.cp310-win_amd64.pyd,sha256=2o67WrtaHeolA2NEdq6i5tdNkvkyWWfn2g1cuy5pJtA,299520
70
+ xoscar/serialization/core.cp310-win_amd64.pyd,sha256=SzsVXuLUqgp_fVBzFeAIy-Gqp9_Gk1A9vZbRRSYMT6Y,300544
72
71
  xoscar/serialization/core.pxd,sha256=X-47bqBM2Kzw5SkLqICdKD0gU6CpmLsBxC3kfW--wVk,1013
73
72
  xoscar/serialization/core.pyx,sha256=H6YZos-OHDxqFvu1vKvoH3Fhw3HzGn8dI3YPACFL5C0,31085
74
73
  xoscar/serialization/cuda.py,sha256=Fj4Cpr_YmkGceUCo0mQn8fRvmHP_5WcLdRx6epZ3RC0,3869
@@ -76,7 +75,7 @@ xoscar/serialization/exception.py,sha256=t6yZn_Ate04UE1RbabNh7mu739sdtwarjuPXWhA
76
75
  xoscar/serialization/numpy.py,sha256=C6WVx-Sdl2OHBAvVY34DFjAKXlekMbpc2ni6bR8wxYo,3001
77
76
  xoscar/serialization/pyfury.py,sha256=3ucal29Hr7PX9_1SfB2x43FE2xw_C0rLkVv3foL7qwM,1200
78
77
  xoscar/serialization/scipy.py,sha256=9ph-yoRoNiwUZTwQrn35U60VPirWlncXNAg6EXvqMR4,2554
79
- xoscar-0.2.1.dist-info/METADATA,sha256=EqRTotGIj5L-Ek7P69Ebga1WXy0adVlkaIvhzQ_dzGI,9438
80
- xoscar-0.2.1.dist-info/WHEEL,sha256=5JPYeYl5ZdvdSkrGS4u21mmpPzpFx42qrXOSIgWf4pg,102
81
- xoscar-0.2.1.dist-info/top_level.txt,sha256=vYlqqY4Nys8Thm1hePIuUv8eQePdULVWMmt7lXtX_ZA,21
82
- xoscar-0.2.1.dist-info/RECORD,,
78
+ xoscar-0.3.1.dist-info/METADATA,sha256=c_LjrY-ux8d-ujpgBouzsrWynvMalj0uipzOO37jsPQ,9471
79
+ xoscar-0.3.1.dist-info/WHEEL,sha256=lO6CqtLHCAi38X3Es1a4R1lAjZFvN010IMRCFo2S7Mc,102
80
+ xoscar-0.3.1.dist-info/top_level.txt,sha256=vYlqqY4Nys8Thm1hePIuUv8eQePdULVWMmt7lXtX_ZA,21
81
+ xoscar-0.3.1.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: bdist_wheel (0.42.0)
2
+ Generator: bdist_wheel (0.43.0)
3
3
  Root-Is-Purelib: false
4
4
  Tag: cp310-cp310-win_amd64
5
5
 
xoscar/entrypoints.py DELETED
@@ -1,42 +0,0 @@
1
- # Copyright 2022-2023 XProbe Inc.
2
- #
3
- # Licensed under the Apache License, Version 2.0 (the "License");
4
- # you may not use this file except in compliance with the License.
5
- # You may obtain a copy of the License at
6
- #
7
- # http://www.apache.org/licenses/LICENSE-2.0
8
- #
9
- # Unless required by applicable law or agreed to in writing, software
10
- # distributed under the License is distributed on an "AS IS" BASIS,
11
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
- # See the License for the specific language governing permissions and
13
- # limitations under the License.
14
-
15
- import functools
16
- import logging
17
- import warnings
18
-
19
- logger = logging.getLogger(__name__)
20
-
21
-
22
- # from https://github.com/numba/numba/blob/master/numba/core/entrypoints.py
23
- # Must put this here to avoid extensions re-triggering initialization
24
- @functools.lru_cache(maxsize=None)
25
- def init_extension_entrypoints():
26
- """Execute all `xoscar_extensions` entry points with the name `init`
27
- If extensions have already been initialized, this function does nothing.
28
- """
29
- from pkg_resources import iter_entry_points # type: ignore
30
-
31
- for entry_point in iter_entry_points("xoscar_extensions", "init"):
32
- logger.info("Loading extension: %s", entry_point)
33
- try:
34
- func = entry_point.load()
35
- func()
36
- except Exception as e:
37
- msg = "Xoscar extension module '{}' failed to load due to '{}({})'."
38
- warnings.warn(
39
- msg.format(entry_point.module_name, type(e).__name__, str(e)),
40
- stacklevel=2,
41
- )
42
- logger.info("Extension loading failed for: %s", entry_point)