xoscar 0.7.0__cp39-cp39-macosx_10_9_x86_64.whl → 0.7.1__cp39-cp39-macosx_10_9_x86_64.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 +1 -0
- xoscar/_utils.cpython-39-darwin.so +0 -0
- xoscar/api.py +34 -0
- xoscar/backends/message.cpython-39-darwin.so +0 -0
- xoscar/context.cpython-39-darwin.so +0 -0
- xoscar/core.cpython-39-darwin.so +0 -0
- xoscar/serialization/core.cpython-39-darwin.so +0 -0
- {xoscar-0.7.0.dist-info → xoscar-0.7.1.dist-info}/METADATA +1 -1
- {xoscar-0.7.0.dist-info → xoscar-0.7.1.dist-info}/RECORD +11 -11
- {xoscar-0.7.0.dist-info → xoscar-0.7.1.dist-info}/WHEEL +0 -0
- {xoscar-0.7.0.dist-info → xoscar-0.7.1.dist-info}/top_level.txt +0 -0
xoscar/__init__.py
CHANGED
|
Binary file
|
xoscar/api.py
CHANGED
|
@@ -26,6 +26,7 @@ from numbers import Number
|
|
|
26
26
|
from typing import (
|
|
27
27
|
TYPE_CHECKING,
|
|
28
28
|
Any,
|
|
29
|
+
Awaitable,
|
|
29
30
|
Dict,
|
|
30
31
|
Generic,
|
|
31
32
|
List,
|
|
@@ -181,6 +182,39 @@ async def create_actor_pool(
|
|
|
181
182
|
)
|
|
182
183
|
|
|
183
184
|
|
|
185
|
+
async def wait_for(fut: Awaitable[Any], timeout: int | float | None = None) -> Any:
|
|
186
|
+
# asyncio.wait_for() on Xoscar actor call cannot work as expected,
|
|
187
|
+
# because when time out, the future will be cancelled, but an actor call will catch this error,
|
|
188
|
+
# and send a CancelMessage to the dest pool, if the CancelMessage cannot be processed correctly(e.g. the dest pool hangs),
|
|
189
|
+
# the time out will never happen. Thus this PR added a new API so that no matter the CancelMessage delivered or not,
|
|
190
|
+
# the timeout will happen as expected.
|
|
191
|
+
loop = asyncio.get_running_loop()
|
|
192
|
+
new_fut = loop.create_future()
|
|
193
|
+
task = asyncio.ensure_future(fut)
|
|
194
|
+
|
|
195
|
+
def on_done(f: asyncio.Future):
|
|
196
|
+
if new_fut.done():
|
|
197
|
+
return
|
|
198
|
+
if f.cancelled():
|
|
199
|
+
new_fut.cancel()
|
|
200
|
+
elif f.exception():
|
|
201
|
+
new_fut.set_exception(f.exception()) # type: ignore
|
|
202
|
+
else:
|
|
203
|
+
new_fut.set_result(f.result())
|
|
204
|
+
|
|
205
|
+
task.add_done_callback(on_done)
|
|
206
|
+
|
|
207
|
+
try:
|
|
208
|
+
return await asyncio.wait_for(new_fut, timeout)
|
|
209
|
+
except asyncio.TimeoutError:
|
|
210
|
+
if not task.done():
|
|
211
|
+
try:
|
|
212
|
+
task.cancel() # Try to cancel without waiting
|
|
213
|
+
except Exception:
|
|
214
|
+
logger.warning("Failed to cancel task", exc_info=True)
|
|
215
|
+
raise
|
|
216
|
+
|
|
217
|
+
|
|
184
218
|
def buffer_ref(address: str, buffer: Any) -> BufferRef:
|
|
185
219
|
"""
|
|
186
220
|
Init buffer ref according address and buffer.
|
|
Binary file
|
|
Binary file
|
xoscar/core.cpython-39-darwin.so
CHANGED
|
Binary file
|
|
Binary file
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
xoscar-0.7.
|
|
2
|
-
xoscar-0.7.
|
|
3
|
-
xoscar-0.7.
|
|
4
|
-
xoscar-0.7.
|
|
1
|
+
xoscar-0.7.1.dist-info/RECORD,,
|
|
2
|
+
xoscar-0.7.1.dist-info/WHEEL,sha256=3Qygrk1hDgANQwZ2WnY8NvFNuTorj1Zw9KuT8tN2L7s,136
|
|
3
|
+
xoscar-0.7.1.dist-info/top_level.txt,sha256=vYlqqY4Nys8Thm1hePIuUv8eQePdULVWMmt7lXtX_ZA,21
|
|
4
|
+
xoscar-0.7.1.dist-info/METADATA,sha256=GNHx0SyIciNz1W7kBgcn5Dwti9Xak-p353ybGr52avQ,9134
|
|
5
5
|
xoscar/_utils.pyx,sha256=frgVQ5xGp92jBKc4PsPmjOlVsXlKeHWtTOAMfHmBaII,7380
|
|
6
6
|
xoscar/backend.py,sha256=is436OPkZfSpQXaoqTRVta5eoye_pp45RFgCstAk2hU,1850
|
|
7
7
|
xoscar/core.pxd,sha256=I_C2ka7XryyGnnAVXUVm8xfS1gtIrCs6X-9rswgOcUU,1317
|
|
@@ -10,20 +10,20 @@ xoscar/context.pxd,sha256=qKa0OyDPZtVymftSh447m-RzFZgmz8rGqQBa7qlauvc,725
|
|
|
10
10
|
xoscar/batch.py,sha256=DpArS0L3WYJ_HVPG-6hSYEwoAFY1mY2-mlC4Jp5M_Dw,7872
|
|
11
11
|
xoscar/nvutils.py,sha256=qmW4mKLU0WB2yCs198ccQOgLL02zB7Fsa-AotO3NOmg,20412
|
|
12
12
|
xoscar/constants.py,sha256=QHHSREw6uWBBjQDCFqlNfTvBZgniJPGy42KSIsR8Fqw,787
|
|
13
|
-
xoscar/__init__.py,sha256=
|
|
14
|
-
xoscar/api.py,sha256=
|
|
15
|
-
xoscar/core.cpython-39-darwin.so,sha256=
|
|
13
|
+
xoscar/__init__.py,sha256=sy7Wtn2EuQZI0I4Az_MfsBVZm4G0DRj46qRyExgmnJk,1622
|
|
14
|
+
xoscar/api.py,sha256=zxNqOjGiTIKuAip9WJ0LOoM7yevD6P5rb-sLynpZ2Zo,14648
|
|
15
|
+
xoscar/core.cpython-39-darwin.so,sha256=ACt4VDUZq2dHhB2nFYWrlP5NDf1Kc0sNKbIEcK6FFGE,413352
|
|
16
16
|
xoscar/utils.py,sha256=MaKiW4Vphwhh8c0yoqN8G8hbJr1zXgpf49EdvmGc1ZU,16500
|
|
17
17
|
xoscar/debug.py,sha256=9Z8SgE2WaKYQcyDo-5-DxEJQ533v7kWjrvCd28pSx3E,5069
|
|
18
18
|
xoscar/libcpp.pxd,sha256=DJqBxLFOKL4iRr9Kale5UH3rbvPRD1x5bTSOPHFpz9I,1147
|
|
19
19
|
xoscar/context.pyx,sha256=8CdgPnWcE9eOp3N600WgDQ03MCi8P73eUOGcfV7Zksg,10942
|
|
20
20
|
xoscar/errors.py,sha256=wBlQOKsXf0Fc4skN39tDie0YZT-VIAuLNRgoDl2pZcA,1241
|
|
21
|
-
xoscar/_utils.cpython-39-darwin.so,sha256=
|
|
21
|
+
xoscar/_utils.cpython-39-darwin.so,sha256=TMbX-0i-fulOFppm8Op9nep3oXAk8JC1zwGz4YrLqcU,161792
|
|
22
22
|
xoscar/core.pyx,sha256=phN-yYV0A0QI8WFi2jCu0nc4CnShTepfDi0V7ZrLYPY,22092
|
|
23
23
|
xoscar/driver.py,sha256=498fowtJr6b3FE8FIOA_Tc1Vwx88nfZw7p0FxrML0h4,1372
|
|
24
24
|
xoscar/profiling.py,sha256=BC5OF0HzSaXv8V7w-y-B8r5gV5DgxHFoTEIF6jCMioQ,8015
|
|
25
25
|
xoscar/_utils.pxd,sha256=5KYAL3jfPdejsHnrGGT2s--ZUX5SXznQWpHVSno429k,1157
|
|
26
|
-
xoscar/context.cpython-39-darwin.so,sha256=
|
|
26
|
+
xoscar/context.cpython-39-darwin.so,sha256=MfCUhn8XtXGUmRce1aCC4gN2mp473hlJFY1Te6zQ7wE,199952
|
|
27
27
|
xoscar/metrics/__init__.py,sha256=9Badi7rxYikGm2dQiNCrj9GgMRBxwuR3JaEKcFZmfak,705
|
|
28
28
|
xoscar/metrics/api.py,sha256=BBlMIFvVAGVfrtpeJ1YlH9Tqhy9OzGavwvGyeHcQ0Tk,8856
|
|
29
29
|
xoscar/metrics/backends/__init__.py,sha256=h_JgzSqV5lP6vQ6XX_17kE4IY4BRnvKta_7VLQAL1ms,581
|
|
@@ -43,13 +43,13 @@ xoscar/serialization/pyfury.py,sha256=sifOnVMYoS82PzZEkzkfxesmMHei23k5UAUUKUyoOY
|
|
|
43
43
|
xoscar/serialization/core.pxd,sha256=k4RoJgX5E5LGs4jdCQ7vvcn26MabXbrWoWhkO49X6YI,985
|
|
44
44
|
xoscar/serialization/__init__.py,sha256=v76XC2OQLp-Yk4_U3_IVguEylMeyRw1UrkU_DPDMh0U,856
|
|
45
45
|
xoscar/serialization/numpy.py,sha256=5Kem87CvpJmzUMp3QHk4WeHU30FoQWTJJP2SwIcaQG0,2919
|
|
46
|
-
xoscar/serialization/core.cpython-39-darwin.so,sha256=
|
|
46
|
+
xoscar/serialization/core.cpython-39-darwin.so,sha256=HcXWPS4DhnR2gs5D8rt1pGBKExTWIehhRfeBX5tJIuw,391584
|
|
47
47
|
xoscar/serialization/cuda.py,sha256=iFUEnN4SiquBIhyieyOrfw3TnKnW-tU_vYgqOxO_DrA,3758
|
|
48
48
|
xoscar/serialization/scipy.py,sha256=yOEi0NB8cqQ6e2UnCZ1w006RsB7T725tIL-DM_hNcsU,2482
|
|
49
49
|
xoscar/serialization/aio.py,sha256=5DySPgDxU43ec7_5Ct44-Oqt7YNSJBfuf8VdQgQlChA,4731
|
|
50
50
|
xoscar/serialization/core.pyx,sha256=bjR-zXGm9qersk7kYPzpjpMIxDl_Auur4BCubRfKmfA,29626
|
|
51
51
|
xoscar/serialization/mlx.py,sha256=N_cvbTUBKc14XWYsPIMz4kDstyRN1DNhb4BVRgnQm8Y,1872
|
|
52
|
-
xoscar/backends/message.cpython-39-darwin.so,sha256=
|
|
52
|
+
xoscar/backends/message.cpython-39-darwin.so,sha256=f-fh1oD03ZrBzAck1x3PzyJM0mnE5lJu3s5r_akmV94,371496
|
|
53
53
|
xoscar/backends/config.py,sha256=4tZMiXAMMS8qQ4SX_LjONLtSQVfZTx3m-IK3EqbkYdk,5375
|
|
54
54
|
xoscar/backends/allocate_strategy.py,sha256=tC1Nbq2tJohahUwd-zoRYHEDX65wyuX8tmeY45uWj_w,4845
|
|
55
55
|
xoscar/backends/__init__.py,sha256=VHEBQcUWM5bj027W8EUf9PiJUAP7JoMrRw3Tsvy5ySw,643
|
|
File without changes
|
|
File without changes
|