dkist-processing-test 1.44.1__tar.gz → 1.44.2rc1__tar.gz
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.
- {dkist_processing_test-1.44.1 → dkist_processing_test-1.44.2rc1}/PKG-INFO +7 -4
- {dkist_processing_test-1.44.1 → dkist_processing_test-1.44.2rc1}/bitbucket-pipelines.yml +1 -1
- {dkist_processing_test-1.44.1 → dkist_processing_test-1.44.2rc1}/dkist_processing_test/tasks/exercise_gpu.py +18 -3
- dkist_processing_test-1.44.2rc1/dkist_processing_test/tasks/exercise_multiprocessing.py +121 -0
- dkist_processing_test-1.44.2rc1/dkist_processing_test/workflows/exercise_dask.py +20 -0
- {dkist_processing_test-1.44.1 → dkist_processing_test-1.44.2rc1}/dkist_processing_test.egg-info/PKG-INFO +7 -4
- {dkist_processing_test-1.44.1 → dkist_processing_test-1.44.2rc1}/dkist_processing_test.egg-info/SOURCES.txt +1 -0
- {dkist_processing_test-1.44.1 → dkist_processing_test-1.44.2rc1}/dkist_processing_test.egg-info/requires.txt +7 -3
- {dkist_processing_test-1.44.1 → dkist_processing_test-1.44.2rc1}/dkist_processing_test.egg-info/scm_file_list.json +1 -0
- {dkist_processing_test-1.44.1 → dkist_processing_test-1.44.2rc1}/dkist_processing_test.egg-info/scm_version.json +2 -2
- {dkist_processing_test-1.44.1 → dkist_processing_test-1.44.2rc1}/pyproject.toml +9 -5
- dkist_processing_test-1.44.1/dkist_processing_test/tasks/exercise_multiprocessing.py +0 -59
- {dkist_processing_test-1.44.1 → dkist_processing_test-1.44.2rc1}/.gitignore +0 -0
- {dkist_processing_test-1.44.1 → dkist_processing_test-1.44.2rc1}/.pre-commit-config.yaml +0 -0
- {dkist_processing_test-1.44.1 → dkist_processing_test-1.44.2rc1}/.rovodev/.review-agent.md +0 -0
- {dkist_processing_test-1.44.1 → dkist_processing_test-1.44.2rc1}/.snyk +0 -0
- {dkist_processing_test-1.44.1 → dkist_processing_test-1.44.2rc1}/README.rst +0 -0
- {dkist_processing_test-1.44.1 → dkist_processing_test-1.44.2rc1}/dkist_processing_test/__init__.py +0 -0
- {dkist_processing_test-1.44.1 → dkist_processing_test-1.44.2rc1}/dkist_processing_test/config.py +0 -0
- {dkist_processing_test-1.44.1 → dkist_processing_test-1.44.2rc1}/dkist_processing_test/models/__init__.py +0 -0
- {dkist_processing_test-1.44.1 → dkist_processing_test-1.44.2rc1}/dkist_processing_test/models/constants.py +0 -0
- {dkist_processing_test-1.44.1 → dkist_processing_test-1.44.2rc1}/dkist_processing_test/models/parameters.py +0 -0
- {dkist_processing_test-1.44.1 → dkist_processing_test-1.44.2rc1}/dkist_processing_test/parsers/__init__.py +0 -0
- {dkist_processing_test-1.44.1 → dkist_processing_test-1.44.2rc1}/dkist_processing_test/parsers/test_l0_fits_access.py +0 -0
- {dkist_processing_test-1.44.1 → dkist_processing_test-1.44.2rc1}/dkist_processing_test/parsers/time.py +0 -0
- {dkist_processing_test-1.44.1 → dkist_processing_test-1.44.2rc1}/dkist_processing_test/tasks/__init__.py +0 -0
- {dkist_processing_test-1.44.1 → dkist_processing_test-1.44.2rc1}/dkist_processing_test/tasks/construct_dataset_extras.py +0 -0
- {dkist_processing_test-1.44.1 → dkist_processing_test-1.44.2rc1}/dkist_processing_test/tasks/exercise_numba.py +0 -0
- {dkist_processing_test-1.44.1 → dkist_processing_test-1.44.2rc1}/dkist_processing_test/tasks/fail.py +0 -0
- {dkist_processing_test-1.44.1 → dkist_processing_test-1.44.2rc1}/dkist_processing_test/tasks/fake_science.py +0 -0
- {dkist_processing_test-1.44.1 → dkist_processing_test-1.44.2rc1}/dkist_processing_test/tasks/high_memory.py +0 -0
- {dkist_processing_test-1.44.1 → dkist_processing_test-1.44.2rc1}/dkist_processing_test/tasks/manual.py +0 -0
- {dkist_processing_test-1.44.1 → dkist_processing_test-1.44.2rc1}/dkist_processing_test/tasks/movie.py +0 -0
- {dkist_processing_test-1.44.1 → dkist_processing_test-1.44.2rc1}/dkist_processing_test/tasks/noop.py +0 -0
- {dkist_processing_test-1.44.1 → dkist_processing_test-1.44.2rc1}/dkist_processing_test/tasks/parse.py +0 -0
- {dkist_processing_test-1.44.1 → dkist_processing_test-1.44.2rc1}/dkist_processing_test/tasks/quality.py +0 -0
- {dkist_processing_test-1.44.1 → dkist_processing_test-1.44.2rc1}/dkist_processing_test/tasks/write_l1.py +0 -0
- {dkist_processing_test-1.44.1 → dkist_processing_test-1.44.2rc1}/dkist_processing_test/tests/__init__.py +0 -0
- {dkist_processing_test-1.44.1 → dkist_processing_test-1.44.2rc1}/dkist_processing_test/tests/conftest.py +0 -0
- {dkist_processing_test-1.44.1 → dkist_processing_test-1.44.2rc1}/dkist_processing_test/tests/test_tasks.py +0 -0
- {dkist_processing_test-1.44.1 → dkist_processing_test-1.44.2rc1}/dkist_processing_test/tests/test_workflows.py +0 -0
- {dkist_processing_test-1.44.1 → dkist_processing_test-1.44.2rc1}/dkist_processing_test/workflows/__init__.py +0 -0
- {dkist_processing_test-1.44.1 → dkist_processing_test-1.44.2rc1}/dkist_processing_test/workflows/common_tasks.py +0 -0
- {dkist_processing_test-1.44.1 → dkist_processing_test-1.44.2rc1}/dkist_processing_test/workflows/end_to_end.py +0 -0
- {dkist_processing_test-1.44.1 → dkist_processing_test-1.44.2rc1}/dkist_processing_test/workflows/exercise_gpu.py +0 -0
- {dkist_processing_test-1.44.1 → dkist_processing_test-1.44.2rc1}/dkist_processing_test/workflows/exercise_multiprocessing.py +0 -0
- {dkist_processing_test-1.44.1 → dkist_processing_test-1.44.2rc1}/dkist_processing_test/workflows/exercise_numba.py +0 -0
- {dkist_processing_test-1.44.1 → dkist_processing_test-1.44.2rc1}/dkist_processing_test/workflows/fail.py +0 -0
- {dkist_processing_test-1.44.1 → dkist_processing_test-1.44.2rc1}/dkist_processing_test/workflows/noop.py +0 -0
- {dkist_processing_test-1.44.1 → dkist_processing_test-1.44.2rc1}/dkist_processing_test/workflows/resource_queue.py +0 -0
- {dkist_processing_test-1.44.1 → dkist_processing_test-1.44.2rc1}/dkist_processing_test/workflows/trial_end_to_end.py +0 -0
- {dkist_processing_test-1.44.1 → dkist_processing_test-1.44.2rc1}/dkist_processing_test.egg-info/dependency_links.txt +0 -0
- {dkist_processing_test-1.44.1 → dkist_processing_test-1.44.2rc1}/dkist_processing_test.egg-info/top_level.txt +0 -0
- {dkist_processing_test-1.44.1 → dkist_processing_test-1.44.2rc1}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: dkist-processing-test
|
|
3
|
-
Version: 1.44.
|
|
3
|
+
Version: 1.44.2rc1
|
|
4
4
|
Summary: Example instrument code used by the DKIST science data processing pipelines to test processing infrastructure
|
|
5
5
|
Author-email: NSO / AURA <dkistdc@nso.edu>
|
|
6
6
|
License: BSD-3-Clause
|
|
@@ -30,6 +30,7 @@ Requires-Dist: dkist-processing-test[inventory]; extra == "test"
|
|
|
30
30
|
Requires-Dist: dkist-processing-test[asdf]; extra == "test"
|
|
31
31
|
Requires-Dist: dkist-processing-test[quality]; extra == "test"
|
|
32
32
|
Requires-Dist: dkist-processing-test[gpu]; extra == "test"
|
|
33
|
+
Requires-Dist: dkist-processing-test[dask]; extra == "test"
|
|
33
34
|
Provides-Extra: inventory
|
|
34
35
|
Requires-Dist: dkist-processing-common[inventory]; extra == "inventory"
|
|
35
36
|
Requires-Dist: dkist-inventory==1.11.9; extra == "inventory"
|
|
@@ -40,6 +41,8 @@ Provides-Extra: quality
|
|
|
40
41
|
Requires-Dist: dkist-quality==2.0.1; extra == "quality"
|
|
41
42
|
Provides-Extra: gpu
|
|
42
43
|
Requires-Dist: cupy-cuda12x[ctk]==14.1.1; extra == "gpu"
|
|
44
|
+
Provides-Extra: dask
|
|
45
|
+
Requires-Dist: dask; extra == "dask"
|
|
43
46
|
Provides-Extra: frozen
|
|
44
47
|
Requires-Dist: Deprecated==1.3.1; extra == "frozen"
|
|
45
48
|
Requires-Dist: ImageIO==2.37.4; extra == "frozen"
|
|
@@ -93,8 +96,8 @@ Requires-Dist: babel==2.18.0; extra == "frozen"
|
|
|
93
96
|
Requires-Dist: beautifulsoup4==4.15.0; extra == "frozen"
|
|
94
97
|
Requires-Dist: billiard==4.2.4; extra == "frozen"
|
|
95
98
|
Requires-Dist: bleach==6.4.0; extra == "frozen"
|
|
96
|
-
Requires-Dist: boto3==1.43.
|
|
97
|
-
Requires-Dist: botocore==1.43.
|
|
99
|
+
Requires-Dist: boto3==1.43.72; extra == "frozen"
|
|
100
|
+
Requires-Dist: botocore==1.43.72; extra == "frozen"
|
|
98
101
|
Requires-Dist: cachetools==7.1.7; extra == "frozen"
|
|
99
102
|
Requires-Dist: cadwyn==7.0.0; extra == "frozen"
|
|
100
103
|
Requires-Dist: celery==5.6.3; extra == "frozen"
|
|
@@ -120,7 +123,7 @@ Requires-Dist: dkist-header-validator==5.4.0; extra == "frozen"
|
|
|
120
123
|
Requires-Dist: dkist-processing-common==14.3.6; extra == "frozen"
|
|
121
124
|
Requires-Dist: dkist-processing-core==7.5.0; extra == "frozen"
|
|
122
125
|
Requires-Dist: dkist-processing-pac==3.1.2; extra == "frozen"
|
|
123
|
-
Requires-Dist: dkist-processing-test==1.44.
|
|
126
|
+
Requires-Dist: dkist-processing-test==1.44.2rc1; extra == "frozen"
|
|
124
127
|
Requires-Dist: dkist-service-configuration==4.3.0; extra == "frozen"
|
|
125
128
|
Requires-Dist: dkist-spectral-lines==3.0.1; extra == "frozen"
|
|
126
129
|
Requires-Dist: dkist_fits_specifications==4.28.1; extra == "frozen"
|
|
@@ -6,6 +6,15 @@ from dkist_service_configuration.logging import logger
|
|
|
6
6
|
|
|
7
7
|
__all__ = ["ExerciseGpu"]
|
|
8
8
|
|
|
9
|
+
# Capture condition of dkist-processing-test[gpu] install.
|
|
10
|
+
GPU_EXTRA_INSTALLED = False
|
|
11
|
+
try:
|
|
12
|
+
import cupy as cp
|
|
13
|
+
|
|
14
|
+
GPU_EXTRA_INSTALLED = True
|
|
15
|
+
except ModuleNotFoundError:
|
|
16
|
+
pass
|
|
17
|
+
|
|
9
18
|
ELEMENT_COUNT = 1_000_000
|
|
10
19
|
SCALE_FACTOR = np.float32(3.0)
|
|
11
20
|
OFFSET = np.float32(7.0)
|
|
@@ -14,11 +23,17 @@ OFFSET = np.float32(7.0)
|
|
|
14
23
|
class ExerciseGpu(TaskBase):
|
|
15
24
|
"""Execute CuPy operations on a GPU, then verify their result on the host."""
|
|
16
25
|
|
|
26
|
+
def pre_run(self) -> None:
|
|
27
|
+
"""Require the GPU workflow extra be installed."""
|
|
28
|
+
if not GPU_EXTRA_INSTALLED:
|
|
29
|
+
raise ModuleNotFoundError(
|
|
30
|
+
f"{self.__class__.__name__} Task requires the cupy package "
|
|
31
|
+
f"(e.g. via a 'gpu' pip_extra on dkist_processing_core.Workflow().add_node()) "
|
|
32
|
+
f"but the required dependency was not found."
|
|
33
|
+
)
|
|
34
|
+
|
|
17
35
|
def run(self) -> None:
|
|
18
36
|
with self.telemetry_span("GPU Setup"):
|
|
19
|
-
# Import lazily so non-GPU tasks can be discovered without initializing CUDA.
|
|
20
|
-
import cupy as cp
|
|
21
|
-
|
|
22
37
|
device_count = cp.cuda.runtime.getDeviceCount()
|
|
23
38
|
if device_count < 1:
|
|
24
39
|
raise RuntimeError("CuPy did not find an available GPU.")
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
"""Exercise CPU-level parallelism in the workflow execution environment."""
|
|
2
|
+
|
|
3
|
+
import os
|
|
4
|
+
from concurrent.futures import ProcessPoolExecutor
|
|
5
|
+
|
|
6
|
+
from dkist_processing_core import TaskBase
|
|
7
|
+
from dkist_service_configuration.logging import logger
|
|
8
|
+
from pydantic import BaseModel
|
|
9
|
+
|
|
10
|
+
from dkist_processing_test.config import dkist_processing_test_configurations
|
|
11
|
+
|
|
12
|
+
__all__ = ["CpuBoundWorkloadResult", "ExerciseDask", "ExerciseMultiprocessing"]
|
|
13
|
+
|
|
14
|
+
# Capture condition of dkist-processing-test[dask] install.
|
|
15
|
+
DASK_EXTRA_INSTALLED = False
|
|
16
|
+
try:
|
|
17
|
+
from dask import compute
|
|
18
|
+
from dask import delayed
|
|
19
|
+
|
|
20
|
+
DASK_EXTRA_INSTALLED = True
|
|
21
|
+
except ModuleNotFoundError:
|
|
22
|
+
pass
|
|
23
|
+
|
|
24
|
+
# Keep computation short while giving each worker process meaningful CPU work.
|
|
25
|
+
WORKLOAD_SIZE = 1_000_000
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
class CpuBoundWorkloadResult(BaseModel):
|
|
29
|
+
"""Result from a CPU-bound workload executed in a worker process."""
|
|
30
|
+
|
|
31
|
+
workload_id: int
|
|
32
|
+
process_id: int
|
|
33
|
+
result: int
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
def _cpu_bound_workload(workload_id: int) -> CpuBoundWorkloadResult:
|
|
37
|
+
"""Run a deterministic CPU-bound workload and report the worker process."""
|
|
38
|
+
result = sum((value + workload_id) ** 2 for value in range(WORKLOAD_SIZE))
|
|
39
|
+
return CpuBoundWorkloadResult(
|
|
40
|
+
workload_id=workload_id,
|
|
41
|
+
process_id=os.getpid(),
|
|
42
|
+
result=result,
|
|
43
|
+
)
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
def _expected_workload_result(workload_id: int) -> int:
|
|
47
|
+
"""Calculate the closed-form result of ``_cpu_bound_workload``."""
|
|
48
|
+
value_sum = WORKLOAD_SIZE * (WORKLOAD_SIZE - 1) // 2
|
|
49
|
+
squared_value_sum = WORKLOAD_SIZE * (WORKLOAD_SIZE - 1) * (2 * WORKLOAD_SIZE - 1) // 6
|
|
50
|
+
return squared_value_sum + 2 * workload_id * value_sum + WORKLOAD_SIZE * workload_id**2
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
class ExerciseMultiprocessing(TaskBase):
|
|
54
|
+
"""Run one CPU-bound workload per configured CPU in separate worker processes."""
|
|
55
|
+
|
|
56
|
+
def run(self) -> None:
|
|
57
|
+
worker_count = dkist_processing_test_configurations.cpu_count
|
|
58
|
+
|
|
59
|
+
if worker_count <= 1:
|
|
60
|
+
raise RuntimeError(f"Insufficient CPU count for multiprocessing test. {worker_count=}")
|
|
61
|
+
|
|
62
|
+
with ProcessPoolExecutor(max_workers=worker_count) as executor:
|
|
63
|
+
workload_results = list(executor.map(_cpu_bound_workload, range(worker_count)))
|
|
64
|
+
|
|
65
|
+
worker_process_ids = {workload_result.process_id for workload_result in workload_results}
|
|
66
|
+
if len(worker_process_ids) != worker_count:
|
|
67
|
+
raise RuntimeError(
|
|
68
|
+
f"Expected {worker_count} worker processes; found {worker_process_ids}."
|
|
69
|
+
)
|
|
70
|
+
|
|
71
|
+
self.workload_results = workload_results
|
|
72
|
+
self.worker_process_ids = worker_process_ids
|
|
73
|
+
logger.info(
|
|
74
|
+
f"ExerciseMultiprocessing completed {worker_count} CPU-bound workloads "
|
|
75
|
+
f"using worker processes {sorted(worker_process_ids)}."
|
|
76
|
+
)
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
class ExerciseDask(TaskBase):
|
|
80
|
+
"""Schedule one CPU-bound workload per configured CPU using Dask processes."""
|
|
81
|
+
|
|
82
|
+
def pre_run(self) -> None:
|
|
83
|
+
"""Require the Dask workflow extra be installed."""
|
|
84
|
+
if not DASK_EXTRA_INSTALLED:
|
|
85
|
+
raise ModuleNotFoundError(
|
|
86
|
+
f"{self.__class__.__name__} Task requires the dask package "
|
|
87
|
+
f"(e.g. via a 'dask' pip_extra on dkist_processing_core.Workflow().add_node()) "
|
|
88
|
+
f"but the required dependency was not found."
|
|
89
|
+
)
|
|
90
|
+
|
|
91
|
+
def run(self) -> None:
|
|
92
|
+
worker_count = dkist_processing_test_configurations.cpu_count
|
|
93
|
+
assert worker_count > 1, f"Insufficient CPU count for Dask test. {worker_count=}"
|
|
94
|
+
|
|
95
|
+
delayed_workloads = [
|
|
96
|
+
delayed(_cpu_bound_workload)(workload_id) for workload_id in range(worker_count)
|
|
97
|
+
]
|
|
98
|
+
workload_results = list(
|
|
99
|
+
compute(
|
|
100
|
+
*delayed_workloads,
|
|
101
|
+
scheduler="processes",
|
|
102
|
+
num_workers=worker_count,
|
|
103
|
+
)
|
|
104
|
+
)
|
|
105
|
+
|
|
106
|
+
assert len(workload_results) == worker_count
|
|
107
|
+
assert {result.workload_id for result in workload_results} == set(range(worker_count))
|
|
108
|
+
assert all(
|
|
109
|
+
result.result == _expected_workload_result(result.workload_id)
|
|
110
|
+
for result in workload_results
|
|
111
|
+
)
|
|
112
|
+
|
|
113
|
+
worker_process_ids = {workload_result.process_id for workload_result in workload_results}
|
|
114
|
+
assert os.getpid() not in worker_process_ids
|
|
115
|
+
|
|
116
|
+
self.workload_results = workload_results
|
|
117
|
+
self.worker_process_ids = worker_process_ids
|
|
118
|
+
logger.info(
|
|
119
|
+
f"ExerciseDask completed {worker_count} CPU-bound workloads "
|
|
120
|
+
f"using worker processes {sorted(worker_process_ids)}."
|
|
121
|
+
)
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"""Workflow that exercises CPU-level multiprocessing with Dask."""
|
|
2
|
+
|
|
3
|
+
from dkist_processing_core import ResourceQueue
|
|
4
|
+
from dkist_processing_core import Workflow
|
|
5
|
+
|
|
6
|
+
from dkist_processing_test.tasks import ExerciseDask
|
|
7
|
+
|
|
8
|
+
exercise_dask = Workflow(
|
|
9
|
+
input_data="input",
|
|
10
|
+
output_data="output",
|
|
11
|
+
category="test",
|
|
12
|
+
detail="exercise_dask",
|
|
13
|
+
workflow_package=__package__,
|
|
14
|
+
)
|
|
15
|
+
exercise_dask.add_node(
|
|
16
|
+
task=ExerciseDask,
|
|
17
|
+
resource_queue=ResourceQueue.MULTI_CORE,
|
|
18
|
+
upstreams=None,
|
|
19
|
+
pip_extras=["dask"],
|
|
20
|
+
)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: dkist-processing-test
|
|
3
|
-
Version: 1.44.
|
|
3
|
+
Version: 1.44.2rc1
|
|
4
4
|
Summary: Example instrument code used by the DKIST science data processing pipelines to test processing infrastructure
|
|
5
5
|
Author-email: NSO / AURA <dkistdc@nso.edu>
|
|
6
6
|
License: BSD-3-Clause
|
|
@@ -30,6 +30,7 @@ Requires-Dist: dkist-processing-test[inventory]; extra == "test"
|
|
|
30
30
|
Requires-Dist: dkist-processing-test[asdf]; extra == "test"
|
|
31
31
|
Requires-Dist: dkist-processing-test[quality]; extra == "test"
|
|
32
32
|
Requires-Dist: dkist-processing-test[gpu]; extra == "test"
|
|
33
|
+
Requires-Dist: dkist-processing-test[dask]; extra == "test"
|
|
33
34
|
Provides-Extra: inventory
|
|
34
35
|
Requires-Dist: dkist-processing-common[inventory]; extra == "inventory"
|
|
35
36
|
Requires-Dist: dkist-inventory==1.11.9; extra == "inventory"
|
|
@@ -40,6 +41,8 @@ Provides-Extra: quality
|
|
|
40
41
|
Requires-Dist: dkist-quality==2.0.1; extra == "quality"
|
|
41
42
|
Provides-Extra: gpu
|
|
42
43
|
Requires-Dist: cupy-cuda12x[ctk]==14.1.1; extra == "gpu"
|
|
44
|
+
Provides-Extra: dask
|
|
45
|
+
Requires-Dist: dask; extra == "dask"
|
|
43
46
|
Provides-Extra: frozen
|
|
44
47
|
Requires-Dist: Deprecated==1.3.1; extra == "frozen"
|
|
45
48
|
Requires-Dist: ImageIO==2.37.4; extra == "frozen"
|
|
@@ -93,8 +96,8 @@ Requires-Dist: babel==2.18.0; extra == "frozen"
|
|
|
93
96
|
Requires-Dist: beautifulsoup4==4.15.0; extra == "frozen"
|
|
94
97
|
Requires-Dist: billiard==4.2.4; extra == "frozen"
|
|
95
98
|
Requires-Dist: bleach==6.4.0; extra == "frozen"
|
|
96
|
-
Requires-Dist: boto3==1.43.
|
|
97
|
-
Requires-Dist: botocore==1.43.
|
|
99
|
+
Requires-Dist: boto3==1.43.72; extra == "frozen"
|
|
100
|
+
Requires-Dist: botocore==1.43.72; extra == "frozen"
|
|
98
101
|
Requires-Dist: cachetools==7.1.7; extra == "frozen"
|
|
99
102
|
Requires-Dist: cadwyn==7.0.0; extra == "frozen"
|
|
100
103
|
Requires-Dist: celery==5.6.3; extra == "frozen"
|
|
@@ -120,7 +123,7 @@ Requires-Dist: dkist-header-validator==5.4.0; extra == "frozen"
|
|
|
120
123
|
Requires-Dist: dkist-processing-common==14.3.6; extra == "frozen"
|
|
121
124
|
Requires-Dist: dkist-processing-core==7.5.0; extra == "frozen"
|
|
122
125
|
Requires-Dist: dkist-processing-pac==3.1.2; extra == "frozen"
|
|
123
|
-
Requires-Dist: dkist-processing-test==1.44.
|
|
126
|
+
Requires-Dist: dkist-processing-test==1.44.2rc1; extra == "frozen"
|
|
124
127
|
Requires-Dist: dkist-service-configuration==4.3.0; extra == "frozen"
|
|
125
128
|
Requires-Dist: dkist-spectral-lines==3.0.1; extra == "frozen"
|
|
126
129
|
Requires-Dist: dkist_fits_specifications==4.28.1; extra == "frozen"
|
|
@@ -41,6 +41,7 @@ dkist_processing_test/tests/test_workflows.py
|
|
|
41
41
|
dkist_processing_test/workflows/__init__.py
|
|
42
42
|
dkist_processing_test/workflows/common_tasks.py
|
|
43
43
|
dkist_processing_test/workflows/end_to_end.py
|
|
44
|
+
dkist_processing_test/workflows/exercise_dask.py
|
|
44
45
|
dkist_processing_test/workflows/exercise_gpu.py
|
|
45
46
|
dkist_processing_test/workflows/exercise_multiprocessing.py
|
|
46
47
|
dkist_processing_test/workflows/exercise_numba.py
|
|
@@ -11,6 +11,9 @@ dkist-spectral-lines==3.0.1
|
|
|
11
11
|
dkist-processing-common[asdf]
|
|
12
12
|
dkist-inventory[asdf]==1.11.9
|
|
13
13
|
|
|
14
|
+
[dask]
|
|
15
|
+
dask
|
|
16
|
+
|
|
14
17
|
[frozen]
|
|
15
18
|
Deprecated==1.3.1
|
|
16
19
|
ImageIO==2.37.4
|
|
@@ -64,8 +67,8 @@ babel==2.18.0
|
|
|
64
67
|
beautifulsoup4==4.15.0
|
|
65
68
|
billiard==4.2.4
|
|
66
69
|
bleach==6.4.0
|
|
67
|
-
boto3==1.43.
|
|
68
|
-
botocore==1.43.
|
|
70
|
+
boto3==1.43.72
|
|
71
|
+
botocore==1.43.72
|
|
69
72
|
cachetools==7.1.7
|
|
70
73
|
cadwyn==7.0.0
|
|
71
74
|
celery==5.6.3
|
|
@@ -91,7 +94,7 @@ dkist-header-validator==5.4.0
|
|
|
91
94
|
dkist-processing-common==14.3.6
|
|
92
95
|
dkist-processing-core==7.5.0
|
|
93
96
|
dkist-processing-pac==3.1.2
|
|
94
|
-
dkist-processing-test==1.44.
|
|
97
|
+
dkist-processing-test==1.44.2rc1
|
|
95
98
|
dkist-service-configuration==4.3.0
|
|
96
99
|
dkist-spectral-lines==3.0.1
|
|
97
100
|
dkist_fits_specifications==4.28.1
|
|
@@ -321,3 +324,4 @@ dkist-processing-test[inventory]
|
|
|
321
324
|
dkist-processing-test[asdf]
|
|
322
325
|
dkist-processing-test[quality]
|
|
323
326
|
dkist-processing-test[gpu]
|
|
327
|
+
dkist-processing-test[dask]
|
|
@@ -35,6 +35,7 @@
|
|
|
35
35
|
"dkist_processing_test/workflows/__init__.py",
|
|
36
36
|
"dkist_processing_test/workflows/common_tasks.py",
|
|
37
37
|
"dkist_processing_test/workflows/end_to_end.py",
|
|
38
|
+
"dkist_processing_test/workflows/exercise_dask.py",
|
|
38
39
|
"dkist_processing_test/workflows/exercise_gpu.py",
|
|
39
40
|
"dkist_processing_test/workflows/exercise_multiprocessing.py",
|
|
40
41
|
"dkist_processing_test/workflows/exercise_numba.py",
|
|
@@ -9,8 +9,8 @@ exclude = ["build*"]
|
|
|
9
9
|
|
|
10
10
|
[tool.dkist-dev-tools]
|
|
11
11
|
# Most recently frozen version by dkist-dev-tools
|
|
12
|
-
version = "1.44.
|
|
13
|
-
date = 2026-08-
|
|
12
|
+
version = "1.44.2rc1"
|
|
13
|
+
date = 2026-08-14T15:27:21.539269
|
|
14
14
|
|
|
15
15
|
[project]
|
|
16
16
|
dynamic = ["version"]
|
|
@@ -52,6 +52,7 @@ test = [
|
|
|
52
52
|
"dkist-processing-test[asdf]",
|
|
53
53
|
"dkist-processing-test[quality]",
|
|
54
54
|
"dkist-processing-test[gpu]",
|
|
55
|
+
"dkist-processing-test[dask]",
|
|
55
56
|
]
|
|
56
57
|
inventory = [
|
|
57
58
|
"dkist-processing-common[inventory]",
|
|
@@ -67,6 +68,9 @@ quality = [
|
|
|
67
68
|
gpu = [
|
|
68
69
|
"cupy-cuda12x[ctk] == 14.1.1",
|
|
69
70
|
]
|
|
71
|
+
dask = [
|
|
72
|
+
"dask",
|
|
73
|
+
]
|
|
70
74
|
frozen = [
|
|
71
75
|
"Deprecated == 1.3.1",
|
|
72
76
|
"ImageIO == 2.37.4",
|
|
@@ -120,8 +124,8 @@ frozen = [
|
|
|
120
124
|
"beautifulsoup4 == 4.15.0",
|
|
121
125
|
"billiard == 4.2.4",
|
|
122
126
|
"bleach == 6.4.0",
|
|
123
|
-
"boto3 == 1.43.
|
|
124
|
-
"botocore == 1.43.
|
|
127
|
+
"boto3 == 1.43.72",
|
|
128
|
+
"botocore == 1.43.72",
|
|
125
129
|
"cachetools == 7.1.7",
|
|
126
130
|
"cadwyn == 7.0.0",
|
|
127
131
|
"celery == 5.6.3",
|
|
@@ -147,7 +151,7 @@ frozen = [
|
|
|
147
151
|
"dkist-processing-common == 14.3.6",
|
|
148
152
|
"dkist-processing-core == 7.5.0",
|
|
149
153
|
"dkist-processing-pac == 3.1.2",
|
|
150
|
-
"dkist-processing-test == 1.44.
|
|
154
|
+
"dkist-processing-test == 1.44.2rc1",
|
|
151
155
|
"dkist-service-configuration == 4.3.0",
|
|
152
156
|
"dkist-spectral-lines == 3.0.1",
|
|
153
157
|
"dkist_fits_specifications == 4.28.1",
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
"""Exercise CPU-level multiprocessing in the workflow execution environment."""
|
|
2
|
-
|
|
3
|
-
import os
|
|
4
|
-
from concurrent.futures import ProcessPoolExecutor
|
|
5
|
-
|
|
6
|
-
from dkist_processing_core import TaskBase
|
|
7
|
-
from dkist_service_configuration.logging import logger
|
|
8
|
-
from pydantic import BaseModel
|
|
9
|
-
|
|
10
|
-
from dkist_processing_test.config import dkist_processing_test_configurations
|
|
11
|
-
|
|
12
|
-
__all__ = ["CpuBoundWorkloadResult", "ExerciseMultiprocessing"]
|
|
13
|
-
|
|
14
|
-
# Keep computation short while giving each worker process meaningful CPU work.
|
|
15
|
-
WORKLOAD_SIZE = 1_000_000
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
class CpuBoundWorkloadResult(BaseModel):
|
|
19
|
-
"""Result from a CPU-bound workload executed in a worker process."""
|
|
20
|
-
|
|
21
|
-
workload_id: int
|
|
22
|
-
process_id: int
|
|
23
|
-
result: int
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
def _cpu_bound_workload(workload_id: int) -> CpuBoundWorkloadResult:
|
|
27
|
-
"""Run a deterministic CPU-bound workload and report the worker process."""
|
|
28
|
-
result = sum((value + workload_id) ** 2 for value in range(WORKLOAD_SIZE))
|
|
29
|
-
return CpuBoundWorkloadResult(
|
|
30
|
-
workload_id=workload_id,
|
|
31
|
-
process_id=os.getpid(),
|
|
32
|
-
result=result,
|
|
33
|
-
)
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
class ExerciseMultiprocessing(TaskBase):
|
|
37
|
-
"""Run one CPU-bound workload per configured CPU in separate worker processes."""
|
|
38
|
-
|
|
39
|
-
def run(self) -> None:
|
|
40
|
-
worker_count = dkist_processing_test_configurations.cpu_count
|
|
41
|
-
|
|
42
|
-
if worker_count <= 1:
|
|
43
|
-
raise RuntimeError(f"Insufficient CPU count for multiprocessing test. {worker_count=}")
|
|
44
|
-
|
|
45
|
-
with ProcessPoolExecutor(max_workers=worker_count) as executor:
|
|
46
|
-
workload_results = list(executor.map(_cpu_bound_workload, range(worker_count)))
|
|
47
|
-
|
|
48
|
-
worker_process_ids = {workload_result.process_id for workload_result in workload_results}
|
|
49
|
-
if len(worker_process_ids) != worker_count:
|
|
50
|
-
raise RuntimeError(
|
|
51
|
-
f"Expected {worker_count} worker processes; found {worker_process_ids}."
|
|
52
|
-
)
|
|
53
|
-
|
|
54
|
-
self.workload_results = workload_results
|
|
55
|
-
self.worker_process_ids = worker_process_ids
|
|
56
|
-
logger.info(
|
|
57
|
-
f"ExerciseMultiprocessing completed {worker_count} CPU-bound workloads "
|
|
58
|
-
f"using worker processes {sorted(worker_process_ids)}."
|
|
59
|
-
)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{dkist_processing_test-1.44.1 → dkist_processing_test-1.44.2rc1}/dkist_processing_test/__init__.py
RENAMED
|
File without changes
|
{dkist_processing_test-1.44.1 → dkist_processing_test-1.44.2rc1}/dkist_processing_test/config.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{dkist_processing_test-1.44.1 → dkist_processing_test-1.44.2rc1}/dkist_processing_test/tasks/fail.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{dkist_processing_test-1.44.1 → dkist_processing_test-1.44.2rc1}/dkist_processing_test/tasks/noop.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|