xoscar 0.3.3__cp311-cp311-win_amd64.whl → 0.4.0__cp311-cp311-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/_utils.cp311-win_amd64.pyd +0 -0
- xoscar/aio/__init__.py +0 -9
- xoscar/backends/communication/socket.py +26 -7
- xoscar/backends/communication/ucx.py +6 -5
- xoscar/backends/message.cp311-win_amd64.pyd +0 -0
- xoscar/backends/message.pyx +8 -0
- xoscar/backends/pool.py +5 -2
- xoscar/collective/uv.dll +0 -0
- xoscar/collective/xoscar_pygloo.cp311-win_amd64.pyd +0 -0
- xoscar/context.cp311-win_amd64.pyd +0 -0
- xoscar/core.cp311-win_amd64.pyd +0 -0
- xoscar/serialization/core.cp311-win_amd64.pyd +0 -0
- xoscar/serialization/core.pyx +1 -11
- xoscar/utils.py +10 -0
- {xoscar-0.3.3.dist-info → xoscar-0.4.0.dist-info}/METADATA +5 -7
- {xoscar-0.3.3.dist-info → xoscar-0.4.0.dist-info}/RECORD +18 -19
- xoscar/aio/_threads.py +0 -35
- {xoscar-0.3.3.dist-info → xoscar-0.4.0.dist-info}/WHEEL +0 -0
- {xoscar-0.3.3.dist-info → xoscar-0.4.0.dist-info}/top_level.txt +0 -0
|
Binary file
|
xoscar/aio/__init__.py
CHANGED
|
@@ -11,15 +11,6 @@
|
|
|
11
11
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
12
|
# See the License for the specific language governing permissions and
|
|
13
13
|
# limitations under the License.
|
|
14
|
-
|
|
15
|
-
import asyncio
|
|
16
|
-
import sys
|
|
17
|
-
|
|
18
14
|
from .file import AioFileObject
|
|
19
15
|
from .lru import alru_cache
|
|
20
16
|
from .parallelism import AioEvent
|
|
21
|
-
|
|
22
|
-
if sys.version_info[:2] < (3, 9):
|
|
23
|
-
from ._threads import to_thread
|
|
24
|
-
|
|
25
|
-
asyncio.to_thread = to_thread
|
|
@@ -17,6 +17,7 @@ from __future__ import annotations
|
|
|
17
17
|
|
|
18
18
|
import asyncio
|
|
19
19
|
import concurrent.futures as futures
|
|
20
|
+
import logging
|
|
20
21
|
import os
|
|
21
22
|
import socket
|
|
22
23
|
import sys
|
|
@@ -30,7 +31,7 @@ from urllib.parse import urlparse
|
|
|
30
31
|
from ..._utils import to_binary
|
|
31
32
|
from ...constants import XOSCAR_UNIX_SOCKET_DIR
|
|
32
33
|
from ...serialization import AioDeserializer, AioSerializer, deserialize
|
|
33
|
-
from ...utils import classproperty, implements, is_v6_ip
|
|
34
|
+
from ...utils import classproperty, implements, is_py_312, is_v6_ip
|
|
34
35
|
from .base import Channel, ChannelType, Client, Server
|
|
35
36
|
from .core import register_client, register_server
|
|
36
37
|
from .utils import read_buffers, write_buffers
|
|
@@ -38,6 +39,9 @@ from .utils import read_buffers, write_buffers
|
|
|
38
39
|
_is_windows: bool = sys.platform.startswith("win")
|
|
39
40
|
|
|
40
41
|
|
|
42
|
+
logger = logging.getLogger(__name__)
|
|
43
|
+
|
|
44
|
+
|
|
41
45
|
class SocketChannel(Channel):
|
|
42
46
|
__slots__ = "reader", "writer", "_channel_type", "_send_lock", "_recv_lock"
|
|
43
47
|
|
|
@@ -131,11 +135,23 @@ class _BaseSocketServer(Server, metaclass=ABCMeta):
|
|
|
131
135
|
if timeout is None:
|
|
132
136
|
await self._aio_server.serve_forever()
|
|
133
137
|
else:
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
138
|
+
if is_py_312():
|
|
139
|
+
# For python 3.12, there's a bug for `serve_forever`:
|
|
140
|
+
# https://github.com/python/cpython/issues/123720,
|
|
141
|
+
# which is unable to be cancelled.
|
|
142
|
+
# Here is really a simulation of `wait_for`
|
|
143
|
+
task = asyncio.create_task(self._aio_server.serve_forever())
|
|
144
|
+
await asyncio.sleep(timeout)
|
|
145
|
+
if task.done():
|
|
146
|
+
logger.warning(f"`serve_forever` should never be done.")
|
|
147
|
+
else:
|
|
148
|
+
task.cancel()
|
|
149
|
+
else:
|
|
150
|
+
future = asyncio.create_task(self._aio_server.serve_forever())
|
|
151
|
+
try:
|
|
152
|
+
await asyncio.wait_for(future, timeout=timeout)
|
|
153
|
+
except (futures.TimeoutError, asyncio.TimeoutError, TimeoutError):
|
|
154
|
+
future.cancel()
|
|
139
155
|
|
|
140
156
|
@implements(Server.on_connected)
|
|
141
157
|
async def on_connected(self, *args, **kwargs):
|
|
@@ -161,7 +177,10 @@ class _BaseSocketServer(Server, metaclass=ABCMeta):
|
|
|
161
177
|
@implements(Server.stop)
|
|
162
178
|
async def stop(self):
|
|
163
179
|
self._aio_server.close()
|
|
164
|
-
|
|
180
|
+
# Python 3.12: # https://github.com/python/cpython/issues/104344
|
|
181
|
+
# `wait_closed` leads to hang
|
|
182
|
+
if not is_py_312():
|
|
183
|
+
await self._aio_server.wait_closed()
|
|
165
184
|
# close all channels
|
|
166
185
|
await asyncio.gather(
|
|
167
186
|
*(channel.close() for channel in self._channels if not channel.closed)
|
|
@@ -34,7 +34,7 @@ from .base import Channel, ChannelType, Client, Server
|
|
|
34
34
|
from .core import register_client, register_server
|
|
35
35
|
from .errors import ChannelClosed
|
|
36
36
|
|
|
37
|
-
ucp = lazy_import("
|
|
37
|
+
ucp = lazy_import("ucxx")
|
|
38
38
|
numba_cuda = lazy_import("numba.cuda")
|
|
39
39
|
rmm = lazy_import("rmm")
|
|
40
40
|
|
|
@@ -86,7 +86,7 @@ class UCXInitializer:
|
|
|
86
86
|
tls += ",cuda_copy"
|
|
87
87
|
|
|
88
88
|
if ucx_config.get("infiniband"): # pragma: no cover
|
|
89
|
-
tls = "
|
|
89
|
+
tls = "ib," + tls
|
|
90
90
|
if ucx_config.get("nvlink"): # pragma: no cover
|
|
91
91
|
tls += ",cuda_ipc"
|
|
92
92
|
|
|
@@ -177,7 +177,8 @@ class UCXInitializer:
|
|
|
177
177
|
new_environ.update(envs)
|
|
178
178
|
os.environ = new_environ # type: ignore
|
|
179
179
|
try:
|
|
180
|
-
|
|
180
|
+
# let UCX determine the appropriate transports
|
|
181
|
+
ucp.init()
|
|
181
182
|
finally:
|
|
182
183
|
os.environ = original_environ
|
|
183
184
|
|
|
@@ -313,7 +314,7 @@ class UCXChannel(Channel):
|
|
|
313
314
|
await self.ucp_endpoint.send(buf)
|
|
314
315
|
for buffer in buffers:
|
|
315
316
|
await self.ucp_endpoint.send(buffer)
|
|
316
|
-
except ucp.exceptions.
|
|
317
|
+
except ucp.exceptions.UCXError: # pragma: no cover
|
|
317
318
|
self.abort()
|
|
318
319
|
raise ChannelClosed("While writing, the connection was closed")
|
|
319
320
|
|
|
@@ -516,7 +517,7 @@ class UCXClient(Client):
|
|
|
516
517
|
|
|
517
518
|
try:
|
|
518
519
|
ucp_endpoint = await ucp.create_endpoint(host, port)
|
|
519
|
-
except ucp.exceptions.
|
|
520
|
+
except ucp.exceptions.UCXError as e: # pragma: no cover
|
|
520
521
|
raise ChannelClosed(
|
|
521
522
|
f"Connection closed before handshake completed, "
|
|
522
523
|
f"local address: {local_address}, dest address: {dest_address}"
|
|
Binary file
|
xoscar/backends/message.pyx
CHANGED
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
# See the License for the specific language governing permissions and
|
|
14
14
|
# limitations under the License.
|
|
15
15
|
|
|
16
|
+
import asyncio
|
|
16
17
|
from enum import Enum
|
|
17
18
|
from types import TracebackType
|
|
18
19
|
from typing import Any, Type
|
|
@@ -21,7 +22,9 @@ from tblib import pickling_support
|
|
|
21
22
|
|
|
22
23
|
from ..core cimport ActorRef, BufferRef
|
|
23
24
|
from ..serialization.core cimport Serializer
|
|
25
|
+
|
|
24
26
|
from ..utils import wrap_exception
|
|
27
|
+
|
|
25
28
|
from .._utils cimport new_random_id
|
|
26
29
|
|
|
27
30
|
# make sure traceback can be pickled
|
|
@@ -245,6 +248,11 @@ cdef class ErrorMessage(_MessageBase):
|
|
|
245
248
|
if issubclass(self.error_type, _AsCauseBase):
|
|
246
249
|
return self.error.with_traceback(self.traceback)
|
|
247
250
|
|
|
251
|
+
# for being compatible with Python 3.12 `asyncio.wait_for`
|
|
252
|
+
# https://github.com/python/cpython/pull/113850
|
|
253
|
+
if isinstance(self.error, asyncio.CancelledError):
|
|
254
|
+
return asyncio.CancelledError(f"[address={self.address}, pid={self.pid}]").with_traceback(self.traceback)
|
|
255
|
+
|
|
248
256
|
return wrap_exception(
|
|
249
257
|
self.error,
|
|
250
258
|
(_AsCauseBase,),
|
xoscar/backends/pool.py
CHANGED
|
@@ -41,7 +41,7 @@ from ..errors import (
|
|
|
41
41
|
ServerClosed,
|
|
42
42
|
)
|
|
43
43
|
from ..metrics import init_metrics
|
|
44
|
-
from ..utils import implements, register_asyncio_task_timeout_detector
|
|
44
|
+
from ..utils import implements, is_zero_ip, register_asyncio_task_timeout_detector
|
|
45
45
|
from .allocate_strategy import AddressSpecified, allocated_type
|
|
46
46
|
from .communication import (
|
|
47
47
|
Channel,
|
|
@@ -164,7 +164,10 @@ class AbstractActorPool(ABC):
|
|
|
164
164
|
):
|
|
165
165
|
# register local pool for local actor lookup.
|
|
166
166
|
# The pool is weakrefed, so we don't need to unregister it.
|
|
167
|
-
|
|
167
|
+
if not is_zero_ip(external_address):
|
|
168
|
+
# Only register_local_pool when we listen on non-zero ip (because all-zero ip is wildcard address),
|
|
169
|
+
# avoid mistaken with another remote service listen on non-zero ip with the same port.
|
|
170
|
+
register_local_pool(external_address, self)
|
|
168
171
|
self.process_index = process_index
|
|
169
172
|
self.label = label
|
|
170
173
|
self.external_address = external_address
|
xoscar/collective/uv.dll
CHANGED
|
Binary file
|
|
Binary file
|
|
Binary file
|
xoscar/core.cp311-win_amd64.pyd
CHANGED
|
Binary file
|
|
Binary file
|
xoscar/serialization/core.pyx
CHANGED
|
@@ -55,7 +55,6 @@ from .pyfury import get_fury
|
|
|
55
55
|
|
|
56
56
|
BUFFER_PICKLE_PROTOCOL = max(pickle.DEFAULT_PROTOCOL, 5)
|
|
57
57
|
cdef bint HAS_PICKLE_BUFFER = pickle.HIGHEST_PROTOCOL >= 5
|
|
58
|
-
cdef bint _PANDAS_HAS_MGR = hasattr(pd.Series([0]), "_mgr")
|
|
59
58
|
|
|
60
59
|
cdef TypeDispatcher _serial_dispatcher = TypeDispatcher()
|
|
61
60
|
cdef dict _deserializers = dict()
|
|
@@ -260,16 +259,7 @@ def unpickle_buffers(list buffers):
|
|
|
260
259
|
else:
|
|
261
260
|
result = cloudpickle.loads(buffers[0], buffers=buffers[1:])
|
|
262
261
|
|
|
263
|
-
|
|
264
|
-
# deserializing from high versions may produce mal-functioned pandas objects,
|
|
265
|
-
# thus the patch is needed
|
|
266
|
-
if _PANDAS_HAS_MGR:
|
|
267
|
-
return result
|
|
268
|
-
else: # pragma: no cover
|
|
269
|
-
if hasattr(result, "_mgr") and isinstance(result, (pd.DataFrame, pd.Series)):
|
|
270
|
-
result._data = getattr(result, "_mgr")
|
|
271
|
-
delattr(result, "_mgr")
|
|
272
|
-
return result
|
|
262
|
+
return result
|
|
273
263
|
|
|
274
264
|
|
|
275
265
|
cdef class PickleSerializer(Serializer):
|
xoscar/utils.py
CHANGED
|
@@ -30,6 +30,7 @@ import sys
|
|
|
30
30
|
import time
|
|
31
31
|
import uuid
|
|
32
32
|
from abc import ABC
|
|
33
|
+
from functools import lru_cache
|
|
33
34
|
from types import TracebackType
|
|
34
35
|
from typing import Callable, Type, Union
|
|
35
36
|
|
|
@@ -464,6 +465,11 @@ def is_linux():
|
|
|
464
465
|
return sys.platform.startswith("linux")
|
|
465
466
|
|
|
466
467
|
|
|
468
|
+
@lru_cache
|
|
469
|
+
def is_py_312():
|
|
470
|
+
return sys.version_info[:2] == (3, 12)
|
|
471
|
+
|
|
472
|
+
|
|
467
473
|
def is_v4_zero_ip(ip_port_addr: str) -> bool:
|
|
468
474
|
return ip_port_addr.split("://")[-1].startswith("0.0.0.0:")
|
|
469
475
|
|
|
@@ -480,6 +486,10 @@ def is_v6_zero_ip(ip_port_addr: str) -> bool:
|
|
|
480
486
|
return True
|
|
481
487
|
|
|
482
488
|
|
|
489
|
+
def is_zero_ip(ip_port_addr: str) -> bool:
|
|
490
|
+
return is_v4_zero_ip(ip_port_addr) or is_v6_zero_ip(ip_port_addr)
|
|
491
|
+
|
|
492
|
+
|
|
483
493
|
def is_v6_ip(ip_port_addr: str) -> bool:
|
|
484
494
|
arr = ip_port_addr.split("://", 1)[-1].split(":")
|
|
485
495
|
return len(arr) > 1
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: xoscar
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.4.0
|
|
4
4
|
Summary: Python actor framework for heterogeneous computing.
|
|
5
5
|
Home-page: http://github.com/xorbitsai/xoscar
|
|
6
6
|
Author: Qin Xuye
|
|
@@ -11,20 +11,19 @@ License: Apache License 2.0
|
|
|
11
11
|
Classifier: Operating System :: OS Independent
|
|
12
12
|
Classifier: Programming Language :: Python
|
|
13
13
|
Classifier: Programming Language :: Python :: 3
|
|
14
|
-
Classifier: Programming Language :: Python :: 3.8
|
|
15
14
|
Classifier: Programming Language :: Python :: 3.9
|
|
16
15
|
Classifier: Programming Language :: Python :: 3.10
|
|
17
16
|
Classifier: Programming Language :: Python :: 3.11
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
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
|
|
21
|
+
Requires-Dist: numpy>=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
26
|
Requires-Dist: packaging
|
|
27
|
-
Requires-Dist: pickle5; python_version < "3.8"
|
|
28
27
|
Requires-Dist: uvloop>=0.14.0; sys_platform != "win32"
|
|
29
28
|
Requires-Dist: scipy>=1.0.0; sys_platform != "win32" or python_version >= "3.10"
|
|
30
29
|
Requires-Dist: scipy<=1.9.1,>=1.0.0; sys_platform == "win32" and python_version < "3.10"
|
|
@@ -36,15 +35,14 @@ Requires-Dist: pytest-timeout>=1.2.0; extra == "dev"
|
|
|
36
35
|
Requires-Dist: pytest-forked>=1.0; extra == "dev"
|
|
37
36
|
Requires-Dist: pytest-asyncio>=0.14.0; extra == "dev"
|
|
38
37
|
Requires-Dist: ipython>=6.5.0; extra == "dev"
|
|
39
|
-
Requires-Dist: sphinx
|
|
38
|
+
Requires-Dist: sphinx; extra == "dev"
|
|
40
39
|
Requires-Dist: pydata-sphinx-theme>=0.3.0; extra == "dev"
|
|
41
40
|
Requires-Dist: sphinx-intl>=0.9.9; extra == "dev"
|
|
42
41
|
Requires-Dist: flake8>=3.8.0; extra == "dev"
|
|
43
42
|
Requires-Dist: black; extra == "dev"
|
|
44
|
-
Requires-Dist: mock>=4.0.0; python_version < "3.8" and extra == "dev"
|
|
45
43
|
Provides-Extra: doc
|
|
46
44
|
Requires-Dist: ipython>=6.5.0; extra == "doc"
|
|
47
|
-
Requires-Dist: sphinx
|
|
45
|
+
Requires-Dist: sphinx; extra == "doc"
|
|
48
46
|
Requires-Dist: pydata-sphinx-theme>=0.3.0; extra == "doc"
|
|
49
47
|
Requires-Dist: sphinx-intl>=0.9.9; extra == "doc"
|
|
50
48
|
Provides-Extra: extra
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
xoscar/__init__.py,sha256=dlwtB7dnDp5WME6CZVQY7d9lk1yJ9s___H5UxjGlAd4,1668
|
|
2
|
-
xoscar/_utils.cp311-win_amd64.pyd,sha256=
|
|
2
|
+
xoscar/_utils.cp311-win_amd64.pyd,sha256=Oy3ArtgPdp-NpVSqzb4YdSJvx-zRIIOAb36-S7EBsbQ,113152
|
|
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,10 +7,10 @@ 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.cp311-win_amd64.pyd,sha256=
|
|
10
|
+
xoscar/context.cp311-win_amd64.pyd,sha256=HNo_x-jnnSfkOGEDxSBvSfTGBP5XIYF35omPvVzhBv8,155648
|
|
11
11
|
xoscar/context.pxd,sha256=6n6IAbmArSRq8EjcsbS6npW8xP1jI0qOoS1fF0oyj-o,746
|
|
12
12
|
xoscar/context.pyx,sha256=FOJVerGOvxe2USryXEQA0rpaFX_ScxISH6QWKUcahY8,11310
|
|
13
|
-
xoscar/core.cp311-win_amd64.pyd,sha256=
|
|
13
|
+
xoscar/core.cp311-win_amd64.pyd,sha256=tUrxztCXfScOqSdrcKJBp3GXq1kChEcSeygAuRwc2ks,324608
|
|
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
|
|
@@ -19,9 +19,8 @@ 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=
|
|
23
|
-
xoscar/aio/__init__.py,sha256=
|
|
24
|
-
xoscar/aio/_threads.py,sha256=-cfEFZUzx5j_3d7M0ub2FQaVZ8MrOG2UVo5ugucEmMY,1348
|
|
22
|
+
xoscar/utils.py,sha256=kLY5cp3tHM9CaEzFG82v7f8XepxC3YZXAUCg5o1uRJ0,16968
|
|
23
|
+
xoscar/aio/__init__.py,sha256=ZLJlVJJH5EhItKD6tLTBri-4FV4kT1O2qdIfBC-df98,691
|
|
25
24
|
xoscar/aio/base.py,sha256=ytknTCjTjNQbTM7l7QGXqPYYUkD7qq-zVBGVZ34L1Tc,2335
|
|
26
25
|
xoscar/aio/file.py,sha256=x1wrvDgtTFMv-6gjSPpBU26jAO5uEAlXGGnFtx7uevQ,1545
|
|
27
26
|
xoscar/aio/lru.py,sha256=KyUfrmqQ2ZkU07Reih-VvUKP1VOg1jmwprEAcZ8pdNE,6539
|
|
@@ -31,17 +30,17 @@ xoscar/backends/allocate_strategy.py,sha256=DzvTlixwzTANURI2mDLHm3vcaugSPDxU6UQZ
|
|
|
31
30
|
xoscar/backends/config.py,sha256=7nmvU_19zYR7n-bT8BNasbjntwmobmMiM7wN7O6Lujc,5129
|
|
32
31
|
xoscar/backends/context.py,sha256=NukXzBwq9ZwuiN1y6RE1hfNGsW589hDtJAVwu-DV9E0,15874
|
|
33
32
|
xoscar/backends/core.py,sha256=bVQxM1E4qMq1-SkfrZM1aolNg1WQv2sHcZxWI1ETyMM,7625
|
|
34
|
-
xoscar/backends/message.cp311-win_amd64.pyd,sha256=
|
|
35
|
-
xoscar/backends/message.pyx,sha256=
|
|
36
|
-
xoscar/backends/pool.py,sha256=
|
|
33
|
+
xoscar/backends/message.cp311-win_amd64.pyd,sha256=ssqPztkmpdXoEoQzst9XyilrdDqYzQLH8q-U7B8YJf0,265216
|
|
34
|
+
xoscar/backends/message.pyx,sha256=23j-fjxOVONPWY0-C5sfCOMbZCx4PTxN0GU8YfrLNeg,18529
|
|
35
|
+
xoscar/backends/pool.py,sha256=DpOwcqXsAy-SJUbHKxsVrwRIzp3VSIqyy2uvM2Kt34A,61017
|
|
37
36
|
xoscar/backends/router.py,sha256=GJpSV_LhzINHdTp5jtsMHfPNMkNb1KI-WlqGqhwApGU,7953
|
|
38
37
|
xoscar/backends/communication/__init__.py,sha256=Z0_RJkPGwLJeapSNt-TiO9DvnpBPu8P4PCooLaAqjkk,1080
|
|
39
38
|
xoscar/backends/communication/base.py,sha256=wmWTeE4lcB_ohqyJJ6MdzMGcrOqy2RSKRp8y-NDuFdY,7736
|
|
40
39
|
xoscar/backends/communication/core.py,sha256=ZM_fU0yokoPzXcJ6j-89llp2r7J9pl3gE5iImn4b4bE,2199
|
|
41
40
|
xoscar/backends/communication/dummy.py,sha256=apbkfFdVWqeqc8Cc1LInOw6ikVoFWixTwBN__djxgBY,8040
|
|
42
41
|
xoscar/backends/communication/errors.py,sha256=-O6ZaKs6Gz7g_ZnKU2wrz8D9btowqaYuQ9u0zCYSLWo,743
|
|
43
|
-
xoscar/backends/communication/socket.py,sha256=
|
|
44
|
-
xoscar/backends/communication/ucx.py,sha256=
|
|
42
|
+
xoscar/backends/communication/socket.py,sha256=FAEU9wu-_VcSw0jBCtyBZ83XB5-Jg0qAyMUrf0zxZl4,13803
|
|
43
|
+
xoscar/backends/communication/ucx.py,sha256=defQN2sirsu-KqvXox_I_wzAfWSq5LJkjKdzo0vtPgw,20234
|
|
45
44
|
xoscar/backends/communication/utils.py,sha256=F-muF5_ow9JzAPAZ3d8XaGDiz3bRZOdWmWBDwQOVLe0,3761
|
|
46
45
|
xoscar/backends/indigen/__init__.py,sha256=Khr2aGbaIw_04NIdY7QNhdljCKbmmzLb4NeAOM3LF8M,701
|
|
47
46
|
xoscar/backends/indigen/backend.py,sha256=cCMkZDEKuRQlFb6v79JvWi5lfzsvAafznOeEWlw7CWY,1663
|
|
@@ -55,8 +54,8 @@ xoscar/collective/common.py,sha256=9c7xq3IOUvfA0I9GnpalUqXZOzmF6IEILv4zL64BYVE,3
|
|
|
55
54
|
xoscar/collective/core.py,sha256=191aPxbUgWpjzrqyozndImDAQhZFmqoQdBkHFLDfXN0,24239
|
|
56
55
|
xoscar/collective/process_group.py,sha256=kTPbrLMJSGhqbiWvTIiz-X3W0rZWd_CFn_zUIlXbOlM,23286
|
|
57
56
|
xoscar/collective/utils.py,sha256=p3WEVtXvnVhkuO5mRgQBhBRFr1dKHcDKMjrbMyuiyfg,1219
|
|
58
|
-
xoscar/collective/uv.dll,sha256=
|
|
59
|
-
xoscar/collective/xoscar_pygloo.cp311-win_amd64.pyd,sha256=
|
|
57
|
+
xoscar/collective/uv.dll,sha256=QDV2lLhvDu20ut8qtTA5QDvI5iGTRjL5f1A7KT175ak,620544
|
|
58
|
+
xoscar/collective/xoscar_pygloo.cp311-win_amd64.pyd,sha256=WVQ6aUzoKWw9k-jYhj1z1-SU63KwL19ff0czKtnTQJU,825344
|
|
60
59
|
xoscar/metrics/__init__.py,sha256=RjXuuYw4I2YYgD8UY2Z5yCZk0Z56xMJ1n40O80Dtxf8,726
|
|
61
60
|
xoscar/metrics/api.py,sha256=dtJ4QrIqQNXhJedeqOPs4TXKgrRGZFFN50xAd9SCfec,9144
|
|
62
61
|
xoscar/metrics/backends/__init__.py,sha256=ZHepfhCDRuK9yz4pAM7bjpWDvS3Ijp1YgyynoUFLeuU,594
|
|
@@ -67,15 +66,15 @@ xoscar/metrics/backends/prometheus/__init__.py,sha256=ZHepfhCDRuK9yz4pAM7bjpWDvS
|
|
|
67
66
|
xoscar/metrics/backends/prometheus/prometheus_metric.py,sha256=65hb8O3tmsEJ7jgOrIwl_suj9SE5Tmqcfjuk0urkLvE,2120
|
|
68
67
|
xoscar/serialization/__init__.py,sha256=NOAn046vnHEkx--82BKNinV8EpyOfT5hqfRBGnKl56s,866
|
|
69
68
|
xoscar/serialization/aio.py,sha256=bL31B2lwrEKA5nztRSeSgDyqsbBN6dCMr6rHwNDGAIk,4715
|
|
70
|
-
xoscar/serialization/core.cp311-win_amd64.pyd,sha256=
|
|
69
|
+
xoscar/serialization/core.cp311-win_amd64.pyd,sha256=NShvfJmEfgsiKdsTr6ggthbqjsUGFmS6-fSr32yIW_U,293888
|
|
71
70
|
xoscar/serialization/core.pxd,sha256=X-47bqBM2Kzw5SkLqICdKD0gU6CpmLsBxC3kfW--wVk,1013
|
|
72
|
-
xoscar/serialization/core.pyx,sha256=
|
|
71
|
+
xoscar/serialization/core.pyx,sha256=ZKexLRnRwZXXn2045kR7xfM_szcoPNrDuouQCWtpFp8,30570
|
|
73
72
|
xoscar/serialization/cuda.py,sha256=Fj4Cpr_YmkGceUCo0mQn8fRvmHP_5WcLdRx6epZ3RC0,3869
|
|
74
73
|
xoscar/serialization/exception.py,sha256=t6yZn_Ate04UE1RbabNh7mu739sdtwarjuPXWhASx7c,1682
|
|
75
74
|
xoscar/serialization/numpy.py,sha256=C6WVx-Sdl2OHBAvVY34DFjAKXlekMbpc2ni6bR8wxYo,3001
|
|
76
75
|
xoscar/serialization/pyfury.py,sha256=3ucal29Hr7PX9_1SfB2x43FE2xw_C0rLkVv3foL7qwM,1200
|
|
77
76
|
xoscar/serialization/scipy.py,sha256=9ph-yoRoNiwUZTwQrn35U60VPirWlncXNAg6EXvqMR4,2554
|
|
78
|
-
xoscar-0.
|
|
79
|
-
xoscar-0.
|
|
80
|
-
xoscar-0.
|
|
81
|
-
xoscar-0.
|
|
77
|
+
xoscar-0.4.0.dist-info/METADATA,sha256=4q4G5TFvvYLHA9zH_ZTmgwu-7DwtRbiXsllkbuu-UPA,9265
|
|
78
|
+
xoscar-0.4.0.dist-info/WHEEL,sha256=yEpuRje-u1Z_HrXQj-UTAfIAegW_HcP2GJ7Ek8BJkUM,102
|
|
79
|
+
xoscar-0.4.0.dist-info/top_level.txt,sha256=vYlqqY4Nys8Thm1hePIuUv8eQePdULVWMmt7lXtX_ZA,21
|
|
80
|
+
xoscar-0.4.0.dist-info/RECORD,,
|
xoscar/aio/_threads.py
DELETED
|
@@ -1,35 +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 contextvars
|
|
16
|
-
import functools
|
|
17
|
-
from asyncio import events
|
|
18
|
-
|
|
19
|
-
__all__ = ("to_thread",)
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
async def to_thread(func, *args, **kwargs):
|
|
23
|
-
"""Asynchronously run function *func* in a separate thread.
|
|
24
|
-
|
|
25
|
-
Any *args and **kwargs supplied for this function are directly passed
|
|
26
|
-
to *func*. Also, the current :class:`contextvars.Context` is propagated,
|
|
27
|
-
allowing context variables from the main thread to be accessed in the
|
|
28
|
-
separate thread.
|
|
29
|
-
|
|
30
|
-
Return a coroutine that can be awaited to get the eventual result of *func*.
|
|
31
|
-
"""
|
|
32
|
-
loop = events.get_running_loop()
|
|
33
|
-
ctx = contextvars.copy_context()
|
|
34
|
-
func_call = functools.partial(ctx.run, func, *args, **kwargs)
|
|
35
|
-
return await loop.run_in_executor(None, func_call)
|
|
File without changes
|
|
File without changes
|