xoscar 0.6.1__cp310-cp310-macosx_10_9_x86_64.whl → 0.6.2__cp310-cp310-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/_utils.cpython-310-darwin.so +0 -0
- xoscar/backends/indigen/pool.py +35 -6
- xoscar/backends/message.cpython-310-darwin.so +0 -0
- xoscar/context.cpython-310-darwin.so +0 -0
- xoscar/core.cpython-310-darwin.so +0 -0
- xoscar/serialization/core.cpython-310-darwin.so +0 -0
- {xoscar-0.6.1.dist-info → xoscar-0.6.2.dist-info}/METADATA +1 -1
- {xoscar-0.6.1.dist-info → xoscar-0.6.2.dist-info}/RECORD +10 -10
- {xoscar-0.6.1.dist-info → xoscar-0.6.2.dist-info}/WHEEL +0 -0
- {xoscar-0.6.1.dist-info → xoscar-0.6.2.dist-info}/top_level.txt +0 -0
|
Binary file
|
xoscar/backends/indigen/pool.py
CHANGED
|
@@ -134,6 +134,31 @@ class SubpoolStatus:
|
|
|
134
134
|
traceback: TracebackType | None = None
|
|
135
135
|
|
|
136
136
|
|
|
137
|
+
_PRE_SET_ENV_LOCK = asyncio.Lock()
|
|
138
|
+
|
|
139
|
+
|
|
140
|
+
@contextlib.asynccontextmanager
|
|
141
|
+
async def _pre_set_env_in_main(env: dict[str, str]):
|
|
142
|
+
# Normally, `env` is set in sub pool,
|
|
143
|
+
# but something may have happened during initialization,
|
|
144
|
+
# e.g. CUDA_VISIBLE_DEVICES is too late to set when some actions may have polluted cuda
|
|
145
|
+
# we have to set environ before new process started
|
|
146
|
+
# enable this only when XOSCAR_PRE_SET_ENV=1
|
|
147
|
+
enable_pre_set_env = bool(int(os.getenv("XOSCAR_PRE_SET_ENV", 0)))
|
|
148
|
+
if not enable_pre_set_env or not env:
|
|
149
|
+
yield
|
|
150
|
+
return
|
|
151
|
+
|
|
152
|
+
global_environ = os.environ.copy()
|
|
153
|
+
async with _PRE_SET_ENV_LOCK:
|
|
154
|
+
try:
|
|
155
|
+
logger.debug("Updating environment variables in main: %s", env)
|
|
156
|
+
os.environ.update(env)
|
|
157
|
+
yield
|
|
158
|
+
finally:
|
|
159
|
+
os.environ = global_environ # type: ignore
|
|
160
|
+
|
|
161
|
+
|
|
137
162
|
@_register_message_handler
|
|
138
163
|
class MainActorPool(MainActorPoolBase):
|
|
139
164
|
@classmethod
|
|
@@ -223,9 +248,12 @@ class MainActorPool(MainActorPoolBase):
|
|
|
223
248
|
|
|
224
249
|
_patch_spawn_get_preparation_data()
|
|
225
250
|
loop = asyncio.get_running_loop()
|
|
226
|
-
with
|
|
227
|
-
|
|
228
|
-
|
|
251
|
+
async with _pre_set_env_in_main(
|
|
252
|
+
actor_pool_config.get_pool_config(process_index)["env"]
|
|
253
|
+
):
|
|
254
|
+
with futures.ThreadPoolExecutor(1) as executor:
|
|
255
|
+
create_pool_task = loop.run_in_executor(executor, start_pool_in_process)
|
|
256
|
+
return await create_pool_task
|
|
229
257
|
|
|
230
258
|
@classmethod
|
|
231
259
|
async def wait_sub_pools_ready(cls, create_pool_tasks: List[asyncio.Task]):
|
|
@@ -394,9 +422,10 @@ class MainActorPool(MainActorPoolBase):
|
|
|
394
422
|
return process, process_status
|
|
395
423
|
|
|
396
424
|
loop = asyncio.get_running_loop()
|
|
397
|
-
with
|
|
398
|
-
|
|
399
|
-
|
|
425
|
+
async with _pre_set_env_in_main(env): # type: ignore
|
|
426
|
+
with futures.ThreadPoolExecutor(1) as executor:
|
|
427
|
+
create_pool_task = loop.run_in_executor(executor, start_pool_in_process)
|
|
428
|
+
process, process_status = await create_pool_task
|
|
400
429
|
|
|
401
430
|
self._config.reset_pool_external_address(
|
|
402
431
|
process_index, process_status.external_addresses[0]
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
xoscar-0.6.
|
|
2
|
-
xoscar-0.6.
|
|
3
|
-
xoscar-0.6.
|
|
4
|
-
xoscar-0.6.
|
|
1
|
+
xoscar-0.6.2.dist-info/RECORD,,
|
|
2
|
+
xoscar-0.6.2.dist-info/WHEEL,sha256=e_QzmxBntUlJDFF5qAWxWPTItYuutkUby5BszMUIWnI,111
|
|
3
|
+
xoscar-0.6.2.dist-info/top_level.txt,sha256=vYlqqY4Nys8Thm1hePIuUv8eQePdULVWMmt7lXtX_ZA,21
|
|
4
|
+
xoscar-0.6.2.dist-info/METADATA,sha256=W_mzFDfmy96PpO9ocfa9_wHgG2aa-geyIc_qJ4D-PHc,9076
|
|
5
5
|
xoscar/_utils.pyx,sha256=6iqO4eTwEI-n9i39n_TKz7MWqbytMRnVNubdJ5egL6o,7279
|
|
6
6
|
xoscar/backend.py,sha256=is436OPkZfSpQXaoqTRVta5eoye_pp45RFgCstAk2hU,1850
|
|
7
7
|
xoscar/core.pxd,sha256=I_C2ka7XryyGnnAVXUVm8xfS1gtIrCs6X-9rswgOcUU,1317
|
|
@@ -10,7 +10,7 @@ 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/_utils.cpython-310-darwin.so,sha256=
|
|
13
|
+
xoscar/_utils.cpython-310-darwin.so,sha256=gvVzg2It2b2yoL7ZbaPHzcq5kVRnyt0Qjh8c_am-2AI,160688
|
|
14
14
|
xoscar/__init__.py,sha256=0zX8kKaio3ZIrlzB79WybcravMJw1OxPWjDspTgJFyQ,1608
|
|
15
15
|
xoscar/api.py,sha256=3hztPoOxg8A_mlhWyWgVP7FMXG0PATA1TP4Rbaj7A-g,13327
|
|
16
16
|
xoscar/utils.py,sha256=jUw6OICZUPBbmS1b3GE4vLctJf6fCKXrYtLtBuK-Oqc,16483
|
|
@@ -20,8 +20,8 @@ xoscar/context.pyx,sha256=8CdgPnWcE9eOp3N600WgDQ03MCi8P73eUOGcfV7Zksg,10942
|
|
|
20
20
|
xoscar/errors.py,sha256=wBlQOKsXf0Fc4skN39tDie0YZT-VIAuLNRgoDl2pZcA,1241
|
|
21
21
|
xoscar/core.pyx,sha256=phN-yYV0A0QI8WFi2jCu0nc4CnShTepfDi0V7ZrLYPY,22092
|
|
22
22
|
xoscar/driver.py,sha256=498fowtJr6b3FE8FIOA_Tc1Vwx88nfZw7p0FxrML0h4,1372
|
|
23
|
-
xoscar/context.cpython-310-darwin.so,sha256=
|
|
24
|
-
xoscar/core.cpython-310-darwin.so,sha256=
|
|
23
|
+
xoscar/context.cpython-310-darwin.so,sha256=YHhie4_b2dn8iZtxgGyeYwMGzM0K_SOxqrXwW3oktHY,200592
|
|
24
|
+
xoscar/core.cpython-310-darwin.so,sha256=2uxow4CevQb3Az8U3WWZuBsu0QjeDtG3YRT7EANEaSc,448704
|
|
25
25
|
xoscar/profiling.py,sha256=BC5OF0HzSaXv8V7w-y-B8r5gV5DgxHFoTEIF6jCMioQ,8015
|
|
26
26
|
xoscar/_utils.pxd,sha256=5KYAL3jfPdejsHnrGGT2s--ZUX5SXznQWpHVSno429k,1157
|
|
27
27
|
xoscar/metrics/__init__.py,sha256=9Badi7rxYikGm2dQiNCrj9GgMRBxwuR3JaEKcFZmfak,705
|
|
@@ -47,11 +47,11 @@ xoscar/serialization/cuda.py,sha256=iFUEnN4SiquBIhyieyOrfw3TnKnW-tU_vYgqOxO_DrA,
|
|
|
47
47
|
xoscar/serialization/scipy.py,sha256=yOEi0NB8cqQ6e2UnCZ1w006RsB7T725tIL-DM_hNcsU,2482
|
|
48
48
|
xoscar/serialization/aio.py,sha256=5DySPgDxU43ec7_5Ct44-Oqt7YNSJBfuf8VdQgQlChA,4731
|
|
49
49
|
xoscar/serialization/core.pyx,sha256=bjR-zXGm9qersk7kYPzpjpMIxDl_Auur4BCubRfKmfA,29626
|
|
50
|
-
xoscar/serialization/core.cpython-310-darwin.so,sha256=
|
|
50
|
+
xoscar/serialization/core.cpython-310-darwin.so,sha256=Lx2pBNMODIaf27pDiuTAXdnRyiD2LcTlG7XyZ4X15Iw,408208
|
|
51
51
|
xoscar/serialization/mlx.py,sha256=N_cvbTUBKc14XWYsPIMz4kDstyRN1DNhb4BVRgnQm8Y,1872
|
|
52
52
|
xoscar/backends/config.py,sha256=4tZMiXAMMS8qQ4SX_LjONLtSQVfZTx3m-IK3EqbkYdk,5375
|
|
53
53
|
xoscar/backends/allocate_strategy.py,sha256=tC1Nbq2tJohahUwd-zoRYHEDX65wyuX8tmeY45uWj_w,4845
|
|
54
|
-
xoscar/backends/message.cpython-310-darwin.so,sha256=
|
|
54
|
+
xoscar/backends/message.cpython-310-darwin.so,sha256=tBsjEKzinkUPhCtP1SuN9qL3BBzpDMRVQa69RN6sEgo,387400
|
|
55
55
|
xoscar/backends/__init__.py,sha256=VHEBQcUWM5bj027W8EUf9PiJUAP7JoMrRw3Tsvy5ySw,643
|
|
56
56
|
xoscar/backends/core.py,sha256=EH-fHlV9x3bnruEHaUtGYO7osKLfLJ4AQHtuzA_mr2g,10857
|
|
57
57
|
xoscar/backends/context.py,sha256=XfDPG2eDhAhE6hWBEkEsHTnyyOYN9R3houlMjAL7BFw,16329
|
|
@@ -61,7 +61,7 @@ xoscar/backends/pool.py,sha256=OezOhvvXAV3TpODhLHmJVgqCfowb3aA_fWZKPodm8bE,61003
|
|
|
61
61
|
xoscar/backends/indigen/backend.py,sha256=znl_fZzWGEtLH8hZ9j9Kkf0fva25jEem2_KO7I1RVvc,1612
|
|
62
62
|
xoscar/backends/indigen/__init__.py,sha256=tKHP5ClzedBRBpZsLRVErR3EUNbbDm4CY4u0rCFJr44,685
|
|
63
63
|
xoscar/backends/indigen/driver.py,sha256=VGzkacYKykegW5qhCuhx01gdgBZEKJjNIyfNCnA6Nm8,952
|
|
64
|
-
xoscar/backends/indigen/pool.py,sha256=
|
|
64
|
+
xoscar/backends/indigen/pool.py,sha256=eeT29MDwou7UQrfY9B9Z7iY6TI7DlWvrZxg0euz96eA,18287
|
|
65
65
|
xoscar/backends/test/backend.py,sha256=nv9WFhH5Bbq4Q1HB9yfpciZBaeHT4IQAtzugBWESrUY,1263
|
|
66
66
|
xoscar/backends/test/__init__.py,sha256=j2ZfD6prD9WjUxRUDC7Eq5Z7N7TkL6fFr59oNyc_vY4,682
|
|
67
67
|
xoscar/backends/test/pool.py,sha256=TW4X6J-92Pti66103poQBNDBznX6CBD3RLOc_zixjTo,7257
|
|
File without changes
|
|
File without changes
|