earthkit-workflows 0.4.4__py3-none-any.whl → 0.4.6__py3-none-any.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.
- cascade/benchmarks/util.py +1 -2
- cascade/executor/executor.py +4 -5
- cascade/executor/platform.py +27 -0
- cascade/executor/runner/packages.py +9 -1
- earthkit/workflows/_version.py +1 -1
- {earthkit_workflows-0.4.4.dist-info → earthkit_workflows-0.4.6.dist-info}/METADATA +1 -1
- {earthkit_workflows-0.4.4.dist-info → earthkit_workflows-0.4.6.dist-info}/RECORD +10 -10
- {earthkit_workflows-0.4.4.dist-info → earthkit_workflows-0.4.6.dist-info}/WHEEL +0 -0
- {earthkit_workflows-0.4.4.dist-info → earthkit_workflows-0.4.6.dist-info}/licenses/LICENSE +0 -0
- {earthkit_workflows-0.4.4.dist-info → earthkit_workflows-0.4.6.dist-info}/top_level.txt +0 -0
cascade/benchmarks/util.py
CHANGED
|
@@ -12,7 +12,6 @@
|
|
|
12
12
|
|
|
13
13
|
import logging
|
|
14
14
|
import logging.config
|
|
15
|
-
import multiprocessing
|
|
16
15
|
import os
|
|
17
16
|
import subprocess
|
|
18
17
|
import sys
|
|
@@ -177,7 +176,7 @@ def run_locally(
|
|
|
177
176
|
gpu_count = get_gpu_count(i, workers)
|
|
178
177
|
# NOTE forkserver/spawn seem to forget venv, we need fork
|
|
179
178
|
logger.debug(f"forking into executor on host {i}")
|
|
180
|
-
p =
|
|
179
|
+
p = platform.get_mp_ctx("executor-loc").Process(
|
|
181
180
|
target=launch_executor,
|
|
182
181
|
args=(
|
|
183
182
|
job,
|
cascade/executor/executor.py
CHANGED
|
@@ -18,7 +18,6 @@ the tasks themselves.
|
|
|
18
18
|
import atexit
|
|
19
19
|
import logging
|
|
20
20
|
import os
|
|
21
|
-
from multiprocessing import get_context
|
|
22
21
|
from multiprocessing.process import BaseProcess
|
|
23
22
|
from typing import Iterable
|
|
24
23
|
|
|
@@ -97,12 +96,12 @@ class Executor:
|
|
|
97
96
|
# TODO make the shm server params configurable
|
|
98
97
|
shm_port = portBase + 2
|
|
99
98
|
shm_api.publish_client_port(shm_port)
|
|
100
|
-
ctx =
|
|
99
|
+
ctx = platform.get_mp_ctx("executor-aux")
|
|
101
100
|
if log_base:
|
|
102
101
|
shm_logging = logging_config_filehandler(f"{log_base}.shm.txt")
|
|
103
102
|
else:
|
|
104
103
|
shm_logging = logging_config
|
|
105
|
-
logger.debug("about to
|
|
104
|
+
logger.debug("about to start an shm process")
|
|
106
105
|
self.shm_process = ctx.Process(
|
|
107
106
|
target=shm_server,
|
|
108
107
|
args=(
|
|
@@ -118,7 +117,7 @@ class Executor:
|
|
|
118
117
|
dsr_logging = logging_config_filehandler(f"{log_base}.dsr.txt")
|
|
119
118
|
else:
|
|
120
119
|
dsr_logging = logging_config
|
|
121
|
-
logger.debug("about to
|
|
120
|
+
logger.debug("about to start a data server process")
|
|
122
121
|
self.data_server = ctx.Process(
|
|
123
122
|
target=start_data_server,
|
|
124
123
|
args=(
|
|
@@ -190,7 +189,7 @@ class Executor:
|
|
|
190
189
|
def start_workers(self, workers: Iterable[WorkerId]) -> None:
|
|
191
190
|
# TODO this method assumes no other message will arrive to mlistener! Thus cannot be used for workers now
|
|
192
191
|
# NOTE fork would be better but causes issues on macos+torch with XPC_ERROR_CONNECTION_INVALID
|
|
193
|
-
ctx =
|
|
192
|
+
ctx = platform.get_mp_ctx("worker")
|
|
194
193
|
for worker in workers:
|
|
195
194
|
runnerContext = RunnerContext(
|
|
196
195
|
workerId=worker,
|
cascade/executor/platform.py
CHANGED
|
@@ -8,9 +8,11 @@
|
|
|
8
8
|
|
|
9
9
|
"""Macos-vs-Linux specific code"""
|
|
10
10
|
|
|
11
|
+
import multiprocessing as mp
|
|
11
12
|
import os
|
|
12
13
|
import socket
|
|
13
14
|
import sys
|
|
15
|
+
import typing
|
|
14
16
|
|
|
15
17
|
|
|
16
18
|
def get_bindabble_self():
|
|
@@ -34,3 +36,28 @@ def gpu_init(worker_num: int):
|
|
|
34
36
|
)
|
|
35
37
|
else:
|
|
36
38
|
pass # no macos specific gpu init due to unified mem model
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
MpSituation = typing.Literal[
|
|
42
|
+
"worker", "executor-loc", "executor-aux", "gateway", "other"
|
|
43
|
+
]
|
|
44
|
+
_MpSituation = typing.get_args(MpSituation)
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
def get_mp_ctx(situation: MpSituation) -> mp.context.BaseContext:
|
|
48
|
+
"""Generally, forking is safe everywhere as we try to be careful not to
|
|
49
|
+
initialize non-safe objects prior to forking. However, combination of
|
|
50
|
+
mac + mps + anemoi + pickled callables causes xpc_error_connection_invalid,
|
|
51
|
+
thus we stick to spawn on darwin platforms. Setting
|
|
52
|
+
OBJC_DISABLE_INITIALIZE_FORK_SAFETY=YES helps some but not fully.
|
|
53
|
+
|
|
54
|
+
We distinguish in which situation is this method called, as fine graining
|
|
55
|
+
may be (eventually) possible
|
|
56
|
+
"""
|
|
57
|
+
|
|
58
|
+
if situation not in _MpSituation:
|
|
59
|
+
raise TypeError(f"{situation=} is not in {_MpSituation}")
|
|
60
|
+
if sys.platform == "darwin":
|
|
61
|
+
return mp.get_context("spawn")
|
|
62
|
+
else:
|
|
63
|
+
return mp.get_context("fork")
|
|
@@ -42,7 +42,15 @@ class PackagesEnv(AbstractContextManager):
|
|
|
42
42
|
logger.debug(
|
|
43
43
|
f"installing {len(packages)} packages: {','.join(packages[:3])}{',...' if len(packages) > 3 else ''}"
|
|
44
44
|
)
|
|
45
|
-
install_command = [
|
|
45
|
+
install_command = [
|
|
46
|
+
"uv",
|
|
47
|
+
"pip",
|
|
48
|
+
"install",
|
|
49
|
+
"--prefix",
|
|
50
|
+
self.td.name,
|
|
51
|
+
"--prerelease",
|
|
52
|
+
"allow",
|
|
53
|
+
]
|
|
46
54
|
if os.environ.get("VENV_OFFLINE", "") == "YES":
|
|
47
55
|
install_command += ["--offline"]
|
|
48
56
|
if cache_dir := os.environ.get("VENV_CACHE", ""):
|
earthkit/workflows/_version.py
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
# Do not change! Do not track in version control!
|
|
2
|
-
__version__ = "0.4.
|
|
2
|
+
__version__ = "0.4.6"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: earthkit-workflows
|
|
3
|
-
Version: 0.4.
|
|
3
|
+
Version: 0.4.6
|
|
4
4
|
Summary: Earthkit Workflows is a Python library for declaring earthkit task DAGs, as well as scheduling and executing them on heterogeneous computing systems.
|
|
5
5
|
Author-email: "European Centre for Medium-Range Weather Forecasts (ECMWF)" <software.support@ecmwf.int>
|
|
6
6
|
License-Expression: Apache-2.0
|
|
@@ -10,7 +10,7 @@ cascade/benchmarks/job1.py,sha256=MOcZZYgf36MzHCjtby0lQyenM1ODUlagG8wtt2CbpnI,46
|
|
|
10
10
|
cascade/benchmarks/matmul.py,sha256=5STuvPY6Q37E2pKRCde9dQjL5M6tx7tkES9cBLZ6eK4,1972
|
|
11
11
|
cascade/benchmarks/plotting.py,sha256=vSz9HHbqZwMXHpBUS-In6xsXGgK7QIoQTTiYfSwYwZs,4428
|
|
12
12
|
cascade/benchmarks/reporting.py,sha256=MejaM-eekbMYLAnuBxGv_t4dR1ODJs4Rpc0fiZSGjyw,5410
|
|
13
|
-
cascade/benchmarks/util.py,sha256=
|
|
13
|
+
cascade/benchmarks/util.py,sha256=ivnd4olB10_F2BCCJan4gzYiyZXMn3gA2iNbacbu464,9812
|
|
14
14
|
cascade/controller/__init__.py,sha256=p4C2p3S_0nUGamP9Mi6cSa5bvpiWbI6sVWtGhFnNqjw,1278
|
|
15
15
|
cascade/controller/act.py,sha256=WHIsk4H-Bbyl_DABX2VWhyKy_cNnp12x1nilatPCL8I,2981
|
|
16
16
|
cascade/controller/core.py,sha256=NqvZ5g5GNphwOpzdXbCI0_fxIzzmO97_n2xZKswK72Q,3589
|
|
@@ -21,14 +21,14 @@ cascade/executor/bridge.py,sha256=WDE-GM2Bv7nUk1-nV-otMGuaRYw1-Vmd7PWploXBp6Y,82
|
|
|
21
21
|
cascade/executor/comms.py,sha256=-9qrKwva6WXkHRQtzSnLFy5gB3bOWuxYJP5fL6Uavw8,8736
|
|
22
22
|
cascade/executor/config.py,sha256=8azy_sXdvDGO0zTNqA0pdtkXsyihM4FQ4U1W_3Dhua0,1571
|
|
23
23
|
cascade/executor/data_server.py,sha256=xLIbLkWn8PnJl4lMP8ADHa2S0EgPwr0-bH7_Sib_Y70,13701
|
|
24
|
-
cascade/executor/executor.py,sha256=
|
|
24
|
+
cascade/executor/executor.py,sha256=htHobVN0eAxofii2g29yN--qCkaQgA05MVKCgCW7Dhg,13644
|
|
25
25
|
cascade/executor/msg.py,sha256=7HI0rKeCRaV1ONR4HWEa64nHbu-p6-QdBwJNitmst48,4340
|
|
26
|
-
cascade/executor/platform.py,sha256=
|
|
26
|
+
cascade/executor/platform.py,sha256=mRUauodvRle9rAbtFr5n9toKzIgt_pecNlhOjon4dvY,2348
|
|
27
27
|
cascade/executor/serde.py,sha256=z6klTOZqW_BVGrbIRNz4FN0_XTfRiKBRQuvgsQIuyAo,2827
|
|
28
28
|
cascade/executor/runner/__init__.py,sha256=30BM80ZyA7w3IrGiKKLSFuhRehbR2Mm99OJ8q5PJ63c,1547
|
|
29
29
|
cascade/executor/runner/entrypoint.py,sha256=WyxOFGAYDQD_fXsM4H9_6xBrnAmQrCTUnljfcW6-BoM,7918
|
|
30
30
|
cascade/executor/runner/memory.py,sha256=jkAV9T7-imciVcGvkV7OhRfosEpOQJU1OME7z-4ztAs,6371
|
|
31
|
-
cascade/executor/runner/packages.py,sha256=
|
|
31
|
+
cascade/executor/runner/packages.py,sha256=zOMCKRX34j6vSIK741KV7kTFRgy3bZz_xeLrldslaL4,2633
|
|
32
32
|
cascade/executor/runner/runner.py,sha256=zqpkvxdWLbwyUFaUbZmSj0KQEBNRpmF8gwVotiaamhc,4870
|
|
33
33
|
cascade/gateway/__init__.py,sha256=1EzMKdLFXEucj0YWOlyVqLx4suOntitwM03T_rRubIk,829
|
|
34
34
|
cascade/gateway/__main__.py,sha256=F_wft7ja5ckM0SqeXsy_u2j-Ch6OTlpbTTlYtDkvGMI,917
|
|
@@ -59,7 +59,7 @@ cascade/shm/disk.py,sha256=Fdl_pKOseaXroRp01OwqWVsdI-sSmiFizIFCdxBuMWM,2653
|
|
|
59
59
|
cascade/shm/func.py,sha256=ZWikgnSLCmbSoW2LDRJwtjxdwTxkR00OUHAsIRQ-ChE,638
|
|
60
60
|
cascade/shm/server.py,sha256=LnnNX0F6QJt5V_JLfmC3ZMHGNL5WpLY44wpB_pYDr7Y,5042
|
|
61
61
|
earthkit/workflows/__init__.py,sha256=-p4anEn0YQbYWM2tbXb0Vc3wq4-m6kFhcNEgAVu5Jis,1948
|
|
62
|
-
earthkit/workflows/_version.py,sha256=
|
|
62
|
+
earthkit/workflows/_version.py,sha256=9B6r-UnSSKU-ri_i5lTQQPMIYjzVbLs7Yazh1HuJ9G8,72
|
|
63
63
|
earthkit/workflows/decorators.py,sha256=DM4QAtQ2glUUcDecwPkXcdlu4dio7MvgpcdmU5LYvD8,937
|
|
64
64
|
earthkit/workflows/fluent.py,sha256=IN_sqwr7W8wbwP7wTOklgnjVe34IUCmv1ku-DWVTCJc,30179
|
|
65
65
|
earthkit/workflows/mark.py,sha256=PdsXmRfhw1SyyJ74mzFPsLRqMCdlYv556fFX4bqlh9Y,1319
|
|
@@ -89,8 +89,8 @@ earthkit/workflows/graph/split.py,sha256=t-Sji5eZb01QO1szqmDNTodDDALqdo-0R0x1ESs
|
|
|
89
89
|
earthkit/workflows/graph/transform.py,sha256=BZ8n7ePUnuGgoHkMqZC3SLzifu4oq6q6t6vka0khFtg,3842
|
|
90
90
|
earthkit/workflows/graph/visit.py,sha256=MP-aFSqOl7aqJY2i7QTgY4epqb6yM7_lK3ofvOqfahw,1755
|
|
91
91
|
earthkit/workflows/plugins/__init__.py,sha256=nhMAC0eMLxoJamjqB5Ns0OWy0OuxEJ_YvaDFGEQITls,129
|
|
92
|
-
earthkit_workflows-0.4.
|
|
93
|
-
earthkit_workflows-0.4.
|
|
94
|
-
earthkit_workflows-0.4.
|
|
95
|
-
earthkit_workflows-0.4.
|
|
96
|
-
earthkit_workflows-0.4.
|
|
92
|
+
earthkit_workflows-0.4.6.dist-info/licenses/LICENSE,sha256=73MJ7twXMKnWwmzmrMiFwUeY7c6JTvxphVggeUq9Sq4,11381
|
|
93
|
+
earthkit_workflows-0.4.6.dist-info/METADATA,sha256=5fpGN2qME_zCzZhyiPrixuMxzQjLS0PRwbWjppj-Zww,1571
|
|
94
|
+
earthkit_workflows-0.4.6.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
95
|
+
earthkit_workflows-0.4.6.dist-info/top_level.txt,sha256=oNrH3Km3hK5kDkTOiM-8G8OQglvZcy-gUKy7rlooWXs,17
|
|
96
|
+
earthkit_workflows-0.4.6.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|