xoscar 0.3.0__cp311-cp311-macosx_10_9_universal2.whl → 0.3.3__cp311-cp311-macosx_10_9_universal2.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 +0 -4
- xoscar/_utils.cpython-311-darwin.so +0 -0
- xoscar/backends/communication/socket.py +24 -4
- xoscar/backends/communication/ucx.py +14 -4
- xoscar/backends/context.py +6 -2
- xoscar/backends/core.py +2 -1
- xoscar/backends/indigen/pool.py +12 -12
- xoscar/backends/message.cpython-311-darwin.so +0 -0
- xoscar/backends/pool.py +0 -3
- xoscar/collective/core.py +1 -1
- xoscar/collective/xoscar_pygloo.cpython-311-darwin.so +0 -0
- xoscar/context.cpython-311-darwin.so +0 -0
- xoscar/core.cpython-311-darwin.so +0 -0
- xoscar/serialization/core.cpython-311-darwin.so +0 -0
- xoscar/utils.py +43 -0
- {xoscar-0.3.0.dist-info → xoscar-0.3.3.dist-info}/METADATA +31 -30
- {xoscar-0.3.0.dist-info → xoscar-0.3.3.dist-info}/RECORD +19 -20
- {xoscar-0.3.0.dist-info → xoscar-0.3.3.dist-info}/WHEEL +1 -1
- xoscar/entrypoints.py +0 -42
- {xoscar-0.3.0.dist-info → xoscar-0.3.3.dist-info}/top_level.txt +0 -0
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
|
|
@@ -30,7 +30,7 @@ from urllib.parse import urlparse
|
|
|
30
30
|
from ..._utils import to_binary
|
|
31
31
|
from ...constants import XOSCAR_UNIX_SOCKET_DIR
|
|
32
32
|
from ...serialization import AioDeserializer, AioSerializer, deserialize
|
|
33
|
-
from ...utils import classproperty, implements
|
|
33
|
+
from ...utils import classproperty, implements, is_v6_ip
|
|
34
34
|
from .base import Channel, ChannelType, Client, Server
|
|
35
35
|
from .core import register_client, register_server
|
|
36
36
|
from .utils import read_buffers, write_buffers
|
|
@@ -201,17 +201,37 @@ class SocketServer(_BaseSocketServer):
|
|
|
201
201
|
def channel_type(self) -> int:
|
|
202
202
|
return ChannelType.remote
|
|
203
203
|
|
|
204
|
+
@classmethod
|
|
205
|
+
def parse_config(cls, config: dict) -> dict:
|
|
206
|
+
if config is None or not config:
|
|
207
|
+
return dict()
|
|
208
|
+
# we only need the following config
|
|
209
|
+
keys = ["listen_elastic_ip"]
|
|
210
|
+
parsed_config = {key: config[key] for key in keys if key in config}
|
|
211
|
+
|
|
212
|
+
return parsed_config
|
|
213
|
+
|
|
204
214
|
@staticmethod
|
|
205
215
|
@implements(Server.create)
|
|
206
216
|
async def create(config: Dict) -> "Server":
|
|
207
217
|
config = config.copy()
|
|
208
218
|
if "address" in config:
|
|
209
219
|
address = config.pop("address")
|
|
210
|
-
host, port = address.
|
|
220
|
+
host, port = address.rsplit(":", 1)
|
|
211
221
|
port = int(port)
|
|
212
222
|
else:
|
|
213
223
|
host = config.pop("host")
|
|
214
224
|
port = int(config.pop("port"))
|
|
225
|
+
_host = host
|
|
226
|
+
if config.pop("listen_elastic_ip", False):
|
|
227
|
+
# The Actor.address will be announce to client, and is not on our host,
|
|
228
|
+
# cannot actually listen on it,
|
|
229
|
+
# so we have to keep SocketServer.host untouched to make sure Actor.address not changed
|
|
230
|
+
if is_v6_ip(host):
|
|
231
|
+
_host = "::"
|
|
232
|
+
else:
|
|
233
|
+
_host = "0.0.0.0"
|
|
234
|
+
|
|
215
235
|
handle_channel = config.pop("handle_channel")
|
|
216
236
|
if "start_serving" not in config:
|
|
217
237
|
config["start_serving"] = False
|
|
@@ -224,7 +244,7 @@ class SocketServer(_BaseSocketServer):
|
|
|
224
244
|
|
|
225
245
|
port = port if port != 0 else None
|
|
226
246
|
aio_server = await asyncio.start_server(
|
|
227
|
-
handle_connection, host=
|
|
247
|
+
handle_connection, host=_host, port=port, **config
|
|
228
248
|
)
|
|
229
249
|
|
|
230
250
|
# get port of the socket if not specified
|
|
@@ -250,7 +270,7 @@ class SocketClient(Client):
|
|
|
250
270
|
async def connect(
|
|
251
271
|
dest_address: str, local_address: str | None = None, **kwargs
|
|
252
272
|
) -> "Client":
|
|
253
|
-
host, port_str = dest_address.
|
|
273
|
+
host, port_str = dest_address.rsplit(":", 1)
|
|
254
274
|
port = int(port_str)
|
|
255
275
|
(reader, writer) = await asyncio.open_connection(host=host, port=port, **kwargs)
|
|
256
276
|
channel = SocketChannel(
|
|
@@ -28,7 +28,7 @@ import numpy as np
|
|
|
28
28
|
from ...nvutils import get_cuda_context, get_index_and_uuid
|
|
29
29
|
from ...serialization import deserialize
|
|
30
30
|
from ...serialization.aio import BUFFER_SIZES_NAME, AioSerializer, get_header_length
|
|
31
|
-
from ...utils import classproperty, implements, is_cuda_buffer, lazy_import
|
|
31
|
+
from ...utils import classproperty, implements, is_cuda_buffer, is_v6_ip, lazy_import
|
|
32
32
|
from ..message import _MessageBase
|
|
33
33
|
from .base import Channel, ChannelType, Client, Server
|
|
34
34
|
from .core import register_client, register_server
|
|
@@ -401,11 +401,21 @@ class UCXServer(Server):
|
|
|
401
401
|
prefix = f"{UCXServer.scheme}://"
|
|
402
402
|
if address.startswith(prefix):
|
|
403
403
|
address = address[len(prefix) :]
|
|
404
|
-
host, port = address.
|
|
404
|
+
host, port = address.rsplit(":", 1)
|
|
405
405
|
port = int(port)
|
|
406
406
|
else:
|
|
407
407
|
host = config.pop("host")
|
|
408
408
|
port = int(config.pop("port"))
|
|
409
|
+
_host = host
|
|
410
|
+
if config.pop("listen_elastic_ip", False):
|
|
411
|
+
# The Actor.address will be announce to client, and is not on our host,
|
|
412
|
+
# cannot actually listen on it,
|
|
413
|
+
# so we have to keep SocketServer.host untouched to make sure Actor.address not changed
|
|
414
|
+
if is_v6_ip(host):
|
|
415
|
+
_host = "::"
|
|
416
|
+
else:
|
|
417
|
+
_host = "0.0.0.0"
|
|
418
|
+
|
|
409
419
|
handle_channel = config.pop("handle_channel")
|
|
410
420
|
|
|
411
421
|
# init
|
|
@@ -414,7 +424,7 @@ class UCXServer(Server):
|
|
|
414
424
|
async def serve_forever(client_ucp_endpoint: "ucp.Endpoint"): # type: ignore
|
|
415
425
|
try:
|
|
416
426
|
await server.on_connected(
|
|
417
|
-
client_ucp_endpoint, local_address=
|
|
427
|
+
client_ucp_endpoint, local_address="%s:%d" % (_host, port)
|
|
418
428
|
)
|
|
419
429
|
except ChannelClosed: # pragma: no cover
|
|
420
430
|
logger.exception("Connection closed before handshake completed")
|
|
@@ -498,7 +508,7 @@ class UCXClient(Client):
|
|
|
498
508
|
prefix = f"{UCXClient.scheme}://"
|
|
499
509
|
if dest_address.startswith(prefix):
|
|
500
510
|
dest_address = dest_address[len(prefix) :]
|
|
501
|
-
host, port_str = dest_address.
|
|
511
|
+
host, port_str = dest_address.rsplit(":", 1)
|
|
502
512
|
port = int(port_str)
|
|
503
513
|
kwargs = kwargs.copy()
|
|
504
514
|
ucx_config = kwargs.pop("config", dict()).get("ucx", dict())
|
xoscar/backends/context.py
CHANGED
|
@@ -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
|
-
|
|
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.
|
|
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)
|
xoscar/backends/indigen/pool.py
CHANGED
|
@@ -132,7 +132,7 @@ class MainActorPool(MainActorPoolBase):
|
|
|
132
132
|
"""Get external address for every process"""
|
|
133
133
|
assert n_process is not None
|
|
134
134
|
if ":" in address:
|
|
135
|
-
host, port_str = address.
|
|
135
|
+
host, port_str = address.rsplit(":", 1)
|
|
136
136
|
port = int(port_str)
|
|
137
137
|
if ports:
|
|
138
138
|
if len(ports) != n_process:
|
|
@@ -324,6 +324,7 @@ class MainActorPool(MainActorPoolBase):
|
|
|
324
324
|
start_method: str | None = None,
|
|
325
325
|
kwargs: dict | None = None,
|
|
326
326
|
):
|
|
327
|
+
# external_address has port 0, subprocess will bind random port.
|
|
327
328
|
external_address = (
|
|
328
329
|
external_address
|
|
329
330
|
or MainActorPool.get_external_addresses(self.external_address, n_process=1)[
|
|
@@ -393,7 +394,7 @@ class MainActorPool(MainActorPoolBase):
|
|
|
393
394
|
content=self._config,
|
|
394
395
|
)
|
|
395
396
|
await self.handle_control_command(control_message)
|
|
396
|
-
|
|
397
|
+
# The actual port will return in process_status.
|
|
397
398
|
return process_status.external_addresses[0]
|
|
398
399
|
|
|
399
400
|
async def remove_sub_pool(
|
|
@@ -416,22 +417,21 @@ class MainActorPool(MainActorPoolBase):
|
|
|
416
417
|
async def kill_sub_pool(
|
|
417
418
|
self, process: multiprocessing.Process, force: bool = False
|
|
418
419
|
):
|
|
419
|
-
if
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
process.terminate()
|
|
420
|
+
if not force: # pragma: no cover
|
|
421
|
+
# must shutdown gracefully, or subprocess created by model will not exit
|
|
422
|
+
if not _is_windows:
|
|
423
|
+
try:
|
|
424
|
+
os.kill(process.pid, signal.SIGINT) # type: ignore
|
|
425
|
+
except OSError: # pragma: no cover
|
|
426
|
+
pass
|
|
427
|
+
process.terminate() # SIGTERM
|
|
428
428
|
wait_pool = futures.ThreadPoolExecutor(1)
|
|
429
429
|
try:
|
|
430
430
|
loop = asyncio.get_running_loop()
|
|
431
431
|
await loop.run_in_executor(wait_pool, process.join, 3)
|
|
432
432
|
finally:
|
|
433
433
|
wait_pool.shutdown(False)
|
|
434
|
-
process.kill()
|
|
434
|
+
process.kill() # SIGKILL
|
|
435
435
|
await asyncio.to_thread(process.join, 5)
|
|
436
436
|
|
|
437
437
|
async def is_sub_pool_alive(self, process: multiprocessing.Process):
|
|
Binary file
|
xoscar/backends/pool.py
CHANGED
|
@@ -33,7 +33,6 @@ from .._utils import TypeDispatcher, create_actor_ref, to_binary
|
|
|
33
33
|
from ..api import Actor
|
|
34
34
|
from ..core import ActorRef, BufferRef, FileObjectRef, register_local_pool
|
|
35
35
|
from ..debug import debug_async_timeout, record_message_trace
|
|
36
|
-
from ..entrypoints import init_extension_entrypoints
|
|
37
36
|
from ..errors import (
|
|
38
37
|
ActorAlreadyExist,
|
|
39
38
|
ActorNotExist,
|
|
@@ -188,8 +187,6 @@ class AbstractActorPool(ABC):
|
|
|
188
187
|
self._asyncio_task_timeout_detector_task = (
|
|
189
188
|
register_asyncio_task_timeout_detector()
|
|
190
189
|
)
|
|
191
|
-
# load third party extensions.
|
|
192
|
-
init_extension_entrypoints()
|
|
193
190
|
# init metrics
|
|
194
191
|
metric_configs = self._config.get_metric_configs()
|
|
195
192
|
metric_backend = metric_configs.get("backend")
|
xoscar/collective/core.py
CHANGED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
xoscar/utils.py
CHANGED
|
@@ -462,3 +462,46 @@ 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.split("://")[-1].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("://")[-1].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 is_v6_ip(ip_port_addr: str) -> bool:
|
|
484
|
+
arr = ip_port_addr.split("://", 1)[-1].split(":")
|
|
485
|
+
return len(arr) > 1
|
|
486
|
+
|
|
487
|
+
|
|
488
|
+
def fix_all_zero_ip(remote_addr: str, connect_addr: str) -> str:
|
|
489
|
+
"""
|
|
490
|
+
Use connect_addr to fix ActorRef.address return by remote server.
|
|
491
|
+
When remote server listen on "0.0.0.0:port" or ":::port", it will return ActorRef.address set to listening addr,
|
|
492
|
+
it cannot be use by client for the following interaction unless we fix it.
|
|
493
|
+
(client will treat 0.0.0.0 as 127.0.0.1)
|
|
494
|
+
|
|
495
|
+
NOTE: Server might return a different addr from a pool for load-balance purpose.
|
|
496
|
+
"""
|
|
497
|
+
if remote_addr == connect_addr:
|
|
498
|
+
return remote_addr
|
|
499
|
+
if not is_v4_zero_ip(remote_addr) and not is_v6_zero_ip(remote_addr):
|
|
500
|
+
# Remote server returns on non-zero ip
|
|
501
|
+
return remote_addr
|
|
502
|
+
if is_v4_zero_ip(connect_addr) or is_v6_zero_ip(connect_addr):
|
|
503
|
+
# Client connect to local server
|
|
504
|
+
return remote_addr
|
|
505
|
+
remote_port = remote_addr.split(":")[-1]
|
|
506
|
+
connect_ip = ":".join(connect_addr.split(":")[0:-1]) # Remote the port
|
|
507
|
+
return f"{connect_ip}:{remote_port}"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: xoscar
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.3
|
|
4
4
|
Summary: Python actor framework for heterogeneous computing.
|
|
5
5
|
Home-page: http://github.com/xorbitsai/xoscar
|
|
6
6
|
Author: Qin Xuye
|
|
@@ -18,40 +18,41 @@ 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
|
|
22
|
-
Requires-Dist: pandas
|
|
23
|
-
Requires-Dist: cloudpickle
|
|
24
|
-
Requires-Dist: psutil
|
|
25
|
-
Requires-Dist: tblib
|
|
26
|
-
Requires-Dist:
|
|
27
|
-
Requires-Dist:
|
|
28
|
-
Requires-Dist:
|
|
29
|
-
Requires-Dist: scipy
|
|
21
|
+
Requires-Dist: numpy<2.0.0,>=1.14.0
|
|
22
|
+
Requires-Dist: pandas>=1.0.0
|
|
23
|
+
Requires-Dist: cloudpickle>=1.5.0
|
|
24
|
+
Requires-Dist: psutil>=5.9.0
|
|
25
|
+
Requires-Dist: tblib>=1.7.0
|
|
26
|
+
Requires-Dist: packaging
|
|
27
|
+
Requires-Dist: pickle5; python_version < "3.8"
|
|
28
|
+
Requires-Dist: uvloop>=0.14.0; sys_platform != "win32"
|
|
29
|
+
Requires-Dist: scipy>=1.0.0; sys_platform != "win32" or python_version >= "3.10"
|
|
30
|
+
Requires-Dist: scipy<=1.9.1,>=1.0.0; sys_platform == "win32" and python_version < "3.10"
|
|
30
31
|
Provides-Extra: dev
|
|
31
|
-
Requires-Dist: cython
|
|
32
|
-
Requires-Dist: pytest
|
|
33
|
-
Requires-Dist: pytest-cov
|
|
34
|
-
Requires-Dist: pytest-timeout
|
|
35
|
-
Requires-Dist: pytest-forked
|
|
36
|
-
Requires-Dist: pytest-asyncio
|
|
37
|
-
Requires-Dist: ipython
|
|
38
|
-
Requires-Dist: sphinx
|
|
39
|
-
Requires-Dist: pydata-sphinx-theme
|
|
40
|
-
Requires-Dist: sphinx-intl
|
|
41
|
-
Requires-Dist: flake8
|
|
42
|
-
Requires-Dist: black
|
|
43
|
-
Requires-Dist: mock
|
|
32
|
+
Requires-Dist: cython>=0.29; extra == "dev"
|
|
33
|
+
Requires-Dist: pytest>=3.5.0; extra == "dev"
|
|
34
|
+
Requires-Dist: pytest-cov>=2.5.0; extra == "dev"
|
|
35
|
+
Requires-Dist: pytest-timeout>=1.2.0; extra == "dev"
|
|
36
|
+
Requires-Dist: pytest-forked>=1.0; extra == "dev"
|
|
37
|
+
Requires-Dist: pytest-asyncio>=0.14.0; extra == "dev"
|
|
38
|
+
Requires-Dist: ipython>=6.5.0; extra == "dev"
|
|
39
|
+
Requires-Dist: sphinx<5.0.0,>=3.0.0; extra == "dev"
|
|
40
|
+
Requires-Dist: pydata-sphinx-theme>=0.3.0; extra == "dev"
|
|
41
|
+
Requires-Dist: sphinx-intl>=0.9.9; extra == "dev"
|
|
42
|
+
Requires-Dist: flake8>=3.8.0; extra == "dev"
|
|
43
|
+
Requires-Dist: black; extra == "dev"
|
|
44
|
+
Requires-Dist: mock>=4.0.0; python_version < "3.8" and extra == "dev"
|
|
44
45
|
Provides-Extra: doc
|
|
45
|
-
Requires-Dist: ipython
|
|
46
|
-
Requires-Dist: sphinx
|
|
47
|
-
Requires-Dist: pydata-sphinx-theme
|
|
48
|
-
Requires-Dist: sphinx-intl
|
|
46
|
+
Requires-Dist: ipython>=6.5.0; extra == "doc"
|
|
47
|
+
Requires-Dist: sphinx<5.0.0,>=3.0.0; extra == "doc"
|
|
48
|
+
Requires-Dist: pydata-sphinx-theme>=0.3.0; extra == "doc"
|
|
49
|
+
Requires-Dist: sphinx-intl>=0.9.9; extra == "doc"
|
|
49
50
|
Provides-Extra: extra
|
|
50
|
-
Requires-Dist: pyarrow
|
|
51
|
+
Requires-Dist: pyarrow>=5.0.0; extra == "extra"
|
|
51
52
|
Provides-Extra: kubernetes
|
|
52
|
-
Requires-Dist: kubernetes
|
|
53
|
+
Requires-Dist: kubernetes>=10.0.0; extra == "kubernetes"
|
|
53
54
|
Provides-Extra: ray
|
|
54
|
-
Requires-Dist: xoscar-ray
|
|
55
|
+
Requires-Dist: xoscar-ray>=0.0.1; extra == "ray"
|
|
55
56
|
|
|
56
57
|
<div align="center">
|
|
57
58
|
<img width="77%" alt="" src="https://raw.githubusercontent.com/xprobe-inc/xoscar/main/doc/source/_static/Xoscar.svg"><br>
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
xoscar-0.3.
|
|
2
|
-
xoscar-0.3.
|
|
3
|
-
xoscar-0.3.
|
|
4
|
-
xoscar-0.3.
|
|
1
|
+
xoscar-0.3.3.dist-info/RECORD,,
|
|
2
|
+
xoscar-0.3.3.dist-info/WHEEL,sha256=XZXEilmK7y5aFoiDGPlGIhKvh8_9iiAydhqclwDqY_c,115
|
|
3
|
+
xoscar-0.3.3.dist-info/top_level.txt,sha256=vYlqqY4Nys8Thm1hePIuUv8eQePdULVWMmt7lXtX_ZA,21
|
|
4
|
+
xoscar-0.3.3.dist-info/METADATA,sha256=JhNlxO_63BsavL78aca-Dh-oYDl82IbMttpvR5Fdq2U,9193
|
|
5
5
|
xoscar/_utils.pyx,sha256=UR1FtYXAYKIdEWR9HulEpMbSOrkQWi6xGz63d4IQmG0,7059
|
|
6
|
-
xoscar/_utils.cpython-311-darwin.so,sha256=
|
|
6
|
+
xoscar/_utils.cpython-311-darwin.so,sha256=B1yNui-WFnWg6W-k3r4CtWDGilGbUDuDFBlc9qJzrmE,385817
|
|
7
7
|
xoscar/backend.py,sha256=is436OPkZfSpQXaoqTRVta5eoye_pp45RFgCstAk2hU,1850
|
|
8
8
|
xoscar/core.pxd,sha256=4lBq8J0kjcXcsGuvN7Kv4xcL5liHwTTFWlqyK7XAEnw,1280
|
|
9
9
|
xoscar/_version.py,sha256=ClSPrUjgGRGHIkVMQV9XQnkQ-n0akJMnq_rh819nqFE,23719
|
|
@@ -11,15 +11,14 @@ xoscar/context.pxd,sha256=qKa0OyDPZtVymftSh447m-RzFZgmz8rGqQBa7qlauvc,725
|
|
|
11
11
|
xoscar/batch.py,sha256=DpArS0L3WYJ_HVPG-6hSYEwoAFY1mY2-mlC4Jp5M_Dw,7872
|
|
12
12
|
xoscar/nvutils.py,sha256=qmW4mKLU0WB2yCs198ccQOgLL02zB7Fsa-AotO3NOmg,20412
|
|
13
13
|
xoscar/constants.py,sha256=Yn59lRIOvE1VFwyuZB5G2-gxYIyhIZ1rVovbdFAR2NM,759
|
|
14
|
-
xoscar/__init__.py,sha256=
|
|
14
|
+
xoscar/__init__.py,sha256=0zX8kKaio3ZIrlzB79WybcravMJw1OxPWjDspTgJFyQ,1608
|
|
15
15
|
xoscar/api.py,sha256=3hztPoOxg8A_mlhWyWgVP7FMXG0PATA1TP4Rbaj7A-g,13327
|
|
16
|
-
xoscar/utils.py,sha256=
|
|
17
|
-
xoscar/context.cpython-311-darwin.so,sha256
|
|
16
|
+
xoscar/utils.py,sha256=oNT8Hj_qjTsPGHcHlha21fh-93g8B9BLZ6tnihgZB00,16231
|
|
17
|
+
xoscar/context.cpython-311-darwin.so,sha256=Vp08uruxcI3a1f2FyIkQjo2tssX3rS8DQfp2mBmytuw,480506
|
|
18
18
|
xoscar/debug.py,sha256=9Z8SgE2WaKYQcyDo-5-DxEJQ533v7kWjrvCd28pSx3E,5069
|
|
19
19
|
xoscar/libcpp.pxd,sha256=DJqBxLFOKL4iRr9Kale5UH3rbvPRD1x5bTSOPHFpz9I,1147
|
|
20
|
-
xoscar/entrypoints.py,sha256=t-PfnqYDyjzXbV-Z-hjaQxpf_m95eSx2saAsb-V2ODY,1642
|
|
21
20
|
xoscar/context.pyx,sha256=8CdgPnWcE9eOp3N600WgDQ03MCi8P73eUOGcfV7Zksg,10942
|
|
22
|
-
xoscar/core.cpython-311-darwin.so,sha256=
|
|
21
|
+
xoscar/core.cpython-311-darwin.so,sha256=UZbup8BRnKwCSN8IJuuoB8uL-KuK4_sk7lBSjNyJ_aU,1000183
|
|
23
22
|
xoscar/errors.py,sha256=wBlQOKsXf0Fc4skN39tDie0YZT-VIAuLNRgoDl2pZcA,1241
|
|
24
23
|
xoscar/core.pyx,sha256=Aqc2i8Fetsd5wRAPF4kL0ddnBZn3E2HRNCvup79BbQc,21730
|
|
25
24
|
xoscar/driver.py,sha256=498fowtJr6b3FE8FIOA_Tc1Vwx88nfZw7p0FxrML0h4,1372
|
|
@@ -33,9 +32,9 @@ xoscar/metrics/backends/prometheus/__init__.py,sha256=h_JgzSqV5lP6vQ6XX_17kE4IY4
|
|
|
33
32
|
xoscar/metrics/backends/prometheus/prometheus_metric.py,sha256=MxoMvVrg0pOkKpkjJ0PcAuEaaEJR2FZljmPrLjQ1-oc,2050
|
|
34
33
|
xoscar/metrics/backends/console/console_metric.py,sha256=y5CCtH33j3AqI5_Uhwi4mgOcAhyhb4cWv_YvR6fxcbQ,2082
|
|
35
34
|
xoscar/metrics/backends/console/__init__.py,sha256=h_JgzSqV5lP6vQ6XX_17kE4IY4BRnvKta_7VLQAL1ms,581
|
|
36
|
-
xoscar/collective/xoscar_pygloo.cpython-311-darwin.so,sha256=
|
|
35
|
+
xoscar/collective/xoscar_pygloo.cpython-311-darwin.so,sha256=dawA3vphdfyKcJ4NKtMrcERE9iCSmtsxQT2jXNWuFI0,2315344
|
|
37
36
|
xoscar/collective/__init__.py,sha256=XsClIkO_3Jd8GDifYuAbZCmJLAo9ZqGvnjUn9iuogmU,774
|
|
38
|
-
xoscar/collective/core.py,sha256=
|
|
37
|
+
xoscar/collective/core.py,sha256=NVR-7Iaq3aDPCN6fgXcq9Ew6uFEszRwxYqmUG9FLcws,23502
|
|
39
38
|
xoscar/collective/common.py,sha256=INAnISbfnRicbbbDHTqbSr9ITb89ZphH5BUkSpEdXXU,3561
|
|
40
39
|
xoscar/collective/utils.py,sha256=3S4qF4JEnAUD3RiWVBUj-ZptL83CBSwGYyVZyIasAsE,1178
|
|
41
40
|
xoscar/collective/process_group.py,sha256=zy7LcIFnEcmrcxuECI89v0bQlUbSqQMkVyBw468WBnk,22599
|
|
@@ -47,30 +46,30 @@ xoscar/serialization/numpy.py,sha256=5Kem87CvpJmzUMp3QHk4WeHU30FoQWTJJP2SwIcaQG0
|
|
|
47
46
|
xoscar/serialization/cuda.py,sha256=iFUEnN4SiquBIhyieyOrfw3TnKnW-tU_vYgqOxO_DrA,3758
|
|
48
47
|
xoscar/serialization/scipy.py,sha256=yOEi0NB8cqQ6e2UnCZ1w006RsB7T725tIL-DM_hNcsU,2482
|
|
49
48
|
xoscar/serialization/aio.py,sha256=S9e3rHMBwqqKmJtDz7KzYAqWc8w9bttA0Dj83IBfEU0,4577
|
|
50
|
-
xoscar/serialization/core.cpython-311-darwin.so,sha256=
|
|
49
|
+
xoscar/serialization/core.cpython-311-darwin.so,sha256=NNGNqdRXr8MHbTrdClUvuxdu4ZiceePNr3wpJFuBm0s,943239
|
|
51
50
|
xoscar/serialization/core.pyx,sha256=E3xIKmdI2gn99JduR3yuU_YTm-lOyG0Tkc7fZVBWCho,30131
|
|
52
|
-
xoscar/backends/message.cpython-311-darwin.so,sha256=
|
|
51
|
+
xoscar/backends/message.cpython-311-darwin.so,sha256=csutaAX5xSw2xmzvJ6dC44ribfoA45QoXci-w1mm2CI,822858
|
|
53
52
|
xoscar/backends/config.py,sha256=EG26f0GwX_f4dAhwTW77RBjiK9h8R_3JrD-rBF1bAq8,4984
|
|
54
53
|
xoscar/backends/allocate_strategy.py,sha256=tC1Nbq2tJohahUwd-zoRYHEDX65wyuX8tmeY45uWj_w,4845
|
|
55
54
|
xoscar/backends/__init__.py,sha256=VHEBQcUWM5bj027W8EUf9PiJUAP7JoMrRw3Tsvy5ySw,643
|
|
56
|
-
xoscar/backends/core.py,sha256=
|
|
57
|
-
xoscar/backends/context.py,sha256=
|
|
55
|
+
xoscar/backends/core.py,sha256=aHb3mMZ9vJe6pxg0P8kSOKvjXF1IaqgOgyhKVhHpNLM,7432
|
|
56
|
+
xoscar/backends/context.py,sha256=Vr_PibRxYCDQ_gYK7r-BOlw9TXw8VQbFsVTH7K7mHPk,15470
|
|
58
57
|
xoscar/backends/router.py,sha256=mhSvM5KVfV882jricVcpyxAqHEvhS4zL6ivczC6fOTE,7746
|
|
59
58
|
xoscar/backends/message.pyx,sha256=_rXcsWPcWu77Z_38rvjDBdQojpY5xJoaHQrt57_LVyo,17612
|
|
60
|
-
xoscar/backends/pool.py,sha256=
|
|
59
|
+
xoscar/backends/pool.py,sha256=bvS1r31O01E8jTdoWOhSqcFymksNqO2nX3Fkqary8Ro,59149
|
|
61
60
|
xoscar/backends/indigen/backend.py,sha256=znl_fZzWGEtLH8hZ9j9Kkf0fva25jEem2_KO7I1RVvc,1612
|
|
62
61
|
xoscar/backends/indigen/__init__.py,sha256=tKHP5ClzedBRBpZsLRVErR3EUNbbDm4CY4u0rCFJr44,685
|
|
63
62
|
xoscar/backends/indigen/driver.py,sha256=VGzkacYKykegW5qhCuhx01gdgBZEKJjNIyfNCnA6Nm8,952
|
|
64
|
-
xoscar/backends/indigen/pool.py,sha256=
|
|
63
|
+
xoscar/backends/indigen/pool.py,sha256=mWYkOP4VVoUsXFgfpwruPuWblF6Waan5vxit8B-9_oQ,16852
|
|
65
64
|
xoscar/backends/test/backend.py,sha256=nv9WFhH5Bbq4Q1HB9yfpciZBaeHT4IQAtzugBWESrUY,1263
|
|
66
65
|
xoscar/backends/test/__init__.py,sha256=j2ZfD6prD9WjUxRUDC7Eq5Z7N7TkL6fFr59oNyc_vY4,682
|
|
67
66
|
xoscar/backends/test/pool.py,sha256=TW4X6J-92Pti66103poQBNDBznX6CBD3RLOc_zixjTo,7257
|
|
68
|
-
xoscar/backends/communication/ucx.py,sha256=
|
|
67
|
+
xoscar/backends/communication/ucx.py,sha256=c9Ma3Z7iDH5_JITlnh46aHk8OlVQ-FebLhs2Ahlgxxw,19701
|
|
69
68
|
xoscar/backends/communication/__init__.py,sha256=tB05BlK63iWQnfJgRzKt4mFKRtmWUki5hUGSZQwAotc,1050
|
|
70
69
|
xoscar/backends/communication/core.py,sha256=sJeE3foRIqVPXldzYpFKHDSsabfAIFBU4JuXY4OyklY,2130
|
|
71
70
|
xoscar/backends/communication/utils.py,sha256=AmovE-hmWLXNCPwHafYuaRjOk8m42BUyT3XBqfXQRVI,3664
|
|
72
71
|
xoscar/backends/communication/errors.py,sha256=V3CdBe2xX9Rwv32f2dH2Msc84yaUhlyerZ42-739o1Q,723
|
|
73
|
-
xoscar/backends/communication/socket.py,sha256=
|
|
72
|
+
xoscar/backends/communication/socket.py,sha256=W_khQ7fMSALFSZ2e_cnud2yp2cOjaMFutkNUhEGelI4,12566
|
|
74
73
|
xoscar/backends/communication/dummy.py,sha256=gaKPNiN4x2aGZV3IGaaa8eaweBVjRh8B19jU1B5t2yw,7798
|
|
75
74
|
xoscar/backends/communication/base.py,sha256=0P4Tr35GSWpRp394e9jVWUUoKKa-gIk177eYPw1BnSU,7421
|
|
76
75
|
xoscar/aio/__init__.py,sha256=4Rv9V_wDIKlg7VcJeo1GVlvobwskYb1jYXef-0GQOaY,809
|
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)
|
|
File without changes
|