executorlib 1.5.1__tar.gz → 1.5.2__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.
- {executorlib-1.5.1 → executorlib-1.5.2}/PKG-INFO +3 -3
- {executorlib-1.5.1 → executorlib-1.5.2}/executorlib/_version.py +2 -2
- {executorlib-1.5.1 → executorlib-1.5.2}/executorlib/task_scheduler/file/shared.py +6 -3
- {executorlib-1.5.1 → executorlib-1.5.2}/executorlib/task_scheduler/file/task_scheduler.py +6 -11
- {executorlib-1.5.1 → executorlib-1.5.2}/executorlib/task_scheduler/interactive/shared.py +0 -1
- {executorlib-1.5.1 → executorlib-1.5.2}/pyproject.toml +2 -2
- {executorlib-1.5.1 → executorlib-1.5.2}/.gitignore +0 -0
- {executorlib-1.5.1 → executorlib-1.5.2}/LICENSE +0 -0
- {executorlib-1.5.1 → executorlib-1.5.2}/README.md +0 -0
- {executorlib-1.5.1 → executorlib-1.5.2}/executorlib/__init__.py +0 -0
- {executorlib-1.5.1 → executorlib-1.5.2}/executorlib/api.py +0 -0
- {executorlib-1.5.1 → executorlib-1.5.2}/executorlib/backend/__init__.py +0 -0
- {executorlib-1.5.1 → executorlib-1.5.2}/executorlib/backend/cache_parallel.py +0 -0
- {executorlib-1.5.1 → executorlib-1.5.2}/executorlib/backend/cache_serial.py +0 -0
- {executorlib-1.5.1 → executorlib-1.5.2}/executorlib/backend/interactive_parallel.py +0 -0
- {executorlib-1.5.1 → executorlib-1.5.2}/executorlib/backend/interactive_serial.py +0 -0
- {executorlib-1.5.1 → executorlib-1.5.2}/executorlib/executor/__init__.py +0 -0
- {executorlib-1.5.1 → executorlib-1.5.2}/executorlib/executor/base.py +0 -0
- {executorlib-1.5.1 → executorlib-1.5.2}/executorlib/executor/flux.py +0 -0
- {executorlib-1.5.1 → executorlib-1.5.2}/executorlib/executor/single.py +0 -0
- {executorlib-1.5.1 → executorlib-1.5.2}/executorlib/executor/slurm.py +0 -0
- {executorlib-1.5.1 → executorlib-1.5.2}/executorlib/standalone/__init__.py +0 -0
- {executorlib-1.5.1 → executorlib-1.5.2}/executorlib/standalone/cache.py +0 -0
- {executorlib-1.5.1 → executorlib-1.5.2}/executorlib/standalone/command.py +0 -0
- {executorlib-1.5.1 → executorlib-1.5.2}/executorlib/standalone/inputcheck.py +0 -0
- {executorlib-1.5.1 → executorlib-1.5.2}/executorlib/standalone/interactive/__init__.py +0 -0
- {executorlib-1.5.1 → executorlib-1.5.2}/executorlib/standalone/interactive/arguments.py +0 -0
- {executorlib-1.5.1 → executorlib-1.5.2}/executorlib/standalone/interactive/backend.py +0 -0
- {executorlib-1.5.1 → executorlib-1.5.2}/executorlib/standalone/interactive/communication.py +0 -0
- {executorlib-1.5.1 → executorlib-1.5.2}/executorlib/standalone/interactive/spawner.py +0 -0
- {executorlib-1.5.1 → executorlib-1.5.2}/executorlib/standalone/plot.py +0 -0
- {executorlib-1.5.1 → executorlib-1.5.2}/executorlib/standalone/queue.py +0 -0
- {executorlib-1.5.1 → executorlib-1.5.2}/executorlib/standalone/serialize.py +0 -0
- {executorlib-1.5.1 → executorlib-1.5.2}/executorlib/task_scheduler/__init__.py +0 -0
- {executorlib-1.5.1 → executorlib-1.5.2}/executorlib/task_scheduler/base.py +0 -0
- {executorlib-1.5.1 → executorlib-1.5.2}/executorlib/task_scheduler/file/__init__.py +0 -0
- {executorlib-1.5.1 → executorlib-1.5.2}/executorlib/task_scheduler/file/backend.py +0 -0
- {executorlib-1.5.1 → executorlib-1.5.2}/executorlib/task_scheduler/file/hdf.py +0 -0
- {executorlib-1.5.1 → executorlib-1.5.2}/executorlib/task_scheduler/file/queue_spawner.py +0 -0
- {executorlib-1.5.1 → executorlib-1.5.2}/executorlib/task_scheduler/file/subprocess_spawner.py +0 -0
- {executorlib-1.5.1 → executorlib-1.5.2}/executorlib/task_scheduler/interactive/__init__.py +0 -0
- {executorlib-1.5.1 → executorlib-1.5.2}/executorlib/task_scheduler/interactive/blockallocation.py +0 -0
- {executorlib-1.5.1 → executorlib-1.5.2}/executorlib/task_scheduler/interactive/dependency.py +0 -0
- {executorlib-1.5.1 → executorlib-1.5.2}/executorlib/task_scheduler/interactive/fluxspawner.py +0 -0
- {executorlib-1.5.1 → executorlib-1.5.2}/executorlib/task_scheduler/interactive/onetoone.py +0 -0
- {executorlib-1.5.1 → executorlib-1.5.2}/executorlib/task_scheduler/interactive/slurmspawner.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: executorlib
|
|
3
|
-
Version: 1.5.
|
|
3
|
+
Version: 1.5.2
|
|
4
4
|
Summary: Up-scale python functions for high performance computing (HPC) with executorlib.
|
|
5
5
|
Project-URL: Homepage, https://github.com/pyiron/executorlib
|
|
6
6
|
Project-URL: Documentation, https://executorlib.readthedocs.io
|
|
@@ -56,12 +56,12 @@ Requires-Dist: ipython<=9.0.2,>=7.33.0; extra == 'all'
|
|
|
56
56
|
Requires-Dist: mpi4py<=4.0.1,>=3.1.4; extra == 'all'
|
|
57
57
|
Requires-Dist: networkx<=3.4.2,>=2.8.8; extra == 'all'
|
|
58
58
|
Requires-Dist: pygraphviz<=1.14,>=1.10; extra == 'all'
|
|
59
|
-
Requires-Dist: pysqa==0.2.
|
|
59
|
+
Requires-Dist: pysqa==0.2.7; extra == 'all'
|
|
60
60
|
Provides-Extra: cache
|
|
61
61
|
Requires-Dist: h5py<=3.14.0,>=3.6.0; extra == 'cache'
|
|
62
62
|
Provides-Extra: cluster
|
|
63
63
|
Requires-Dist: h5py<=3.14.0,>=3.6.0; extra == 'cluster'
|
|
64
|
-
Requires-Dist: pysqa==0.2.
|
|
64
|
+
Requires-Dist: pysqa==0.2.7; extra == 'cluster'
|
|
65
65
|
Provides-Extra: graph
|
|
66
66
|
Requires-Dist: networkx<=3.4.2,>=2.8.8; extra == 'graph'
|
|
67
67
|
Requires-Dist: pygraphviz<=1.14,>=1.10; extra == 'graph'
|
|
@@ -52,7 +52,6 @@ class FutureItem:
|
|
|
52
52
|
|
|
53
53
|
def execute_tasks_h5(
|
|
54
54
|
future_queue: queue.Queue,
|
|
55
|
-
cache_directory: str,
|
|
56
55
|
execute_function: Callable,
|
|
57
56
|
resource_dict: dict,
|
|
58
57
|
terminate_function: Optional[Callable] = None,
|
|
@@ -65,7 +64,6 @@ def execute_tasks_h5(
|
|
|
65
64
|
|
|
66
65
|
Args:
|
|
67
66
|
future_queue (queue.Queue): The queue containing the tasks.
|
|
68
|
-
cache_directory (str): The directory to store the HDF5 files.
|
|
69
67
|
resource_dict (dict): A dictionary of resources required by the task. With the following keys:
|
|
70
68
|
- cores (int): number of MPI cores to be used for each function call
|
|
71
69
|
- cwd (str/None): current working directory where the parallel python task is executed
|
|
@@ -81,6 +79,7 @@ def execute_tasks_h5(
|
|
|
81
79
|
"""
|
|
82
80
|
memory_dict: dict = {}
|
|
83
81
|
process_dict: dict = {}
|
|
82
|
+
cache_dir_dict: dict = {}
|
|
84
83
|
file_name_dict: dict = {}
|
|
85
84
|
while True:
|
|
86
85
|
task_dict = None
|
|
@@ -104,6 +103,7 @@ def execute_tasks_h5(
|
|
|
104
103
|
{k: v for k, v in resource_dict.items() if k not in task_resource_dict}
|
|
105
104
|
)
|
|
106
105
|
cache_key = task_resource_dict.pop("cache_key", None)
|
|
106
|
+
cache_directory = os.path.abspath(task_resource_dict.pop("cache_directory"))
|
|
107
107
|
task_key, data_dict = serialize_funct_h5(
|
|
108
108
|
fn=task_dict["fn"],
|
|
109
109
|
fn_args=task_args,
|
|
@@ -147,11 +147,14 @@ def execute_tasks_h5(
|
|
|
147
147
|
cache_directory, task_key + "_o.h5"
|
|
148
148
|
)
|
|
149
149
|
memory_dict[task_key] = task_dict["future"]
|
|
150
|
+
cache_dir_dict[task_key] = cache_directory
|
|
150
151
|
future_queue.task_done()
|
|
151
152
|
else:
|
|
152
153
|
memory_dict = {
|
|
153
154
|
key: _check_task_output(
|
|
154
|
-
task_key=key,
|
|
155
|
+
task_key=key,
|
|
156
|
+
future_obj=value,
|
|
157
|
+
cache_directory=cache_dir_dict[key],
|
|
155
158
|
)
|
|
156
159
|
for key, value in memory_dict.items()
|
|
157
160
|
if not value.done()
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import os
|
|
2
1
|
from threading import Thread
|
|
3
2
|
from typing import Callable, Optional
|
|
4
3
|
|
|
@@ -27,7 +26,6 @@ except ImportError:
|
|
|
27
26
|
class FileTaskScheduler(TaskSchedulerBase):
|
|
28
27
|
def __init__(
|
|
29
28
|
self,
|
|
30
|
-
cache_directory: str = "executorlib_cache",
|
|
31
29
|
resource_dict: Optional[dict] = None,
|
|
32
30
|
execute_function: Callable = execute_with_pysqa,
|
|
33
31
|
terminate_function: Optional[Callable] = None,
|
|
@@ -39,10 +37,10 @@ class FileTaskScheduler(TaskSchedulerBase):
|
|
|
39
37
|
Initialize the FileExecutor.
|
|
40
38
|
|
|
41
39
|
Args:
|
|
42
|
-
cache_directory (str, optional): The directory to store cache files. Defaults to "executorlib_cache".
|
|
43
40
|
resource_dict (dict): A dictionary of resources required by the task. With the following keys:
|
|
44
41
|
- cores (int): number of MPI cores to be used for each function call
|
|
45
42
|
- cwd (str/None): current working directory where the parallel python task is executed
|
|
43
|
+
- cache_directory (str): The directory to store cache files.
|
|
46
44
|
execute_function (Callable, optional): The function to execute tasks. Defaults to execute_in_subprocess.
|
|
47
45
|
terminate_function (Callable, optional): The function to terminate the tasks.
|
|
48
46
|
pysqa_config_directory (str, optional): path to the pysqa config directory (only for pysqa based backend).
|
|
@@ -53,6 +51,7 @@ class FileTaskScheduler(TaskSchedulerBase):
|
|
|
53
51
|
default_resource_dict = {
|
|
54
52
|
"cores": 1,
|
|
55
53
|
"cwd": None,
|
|
54
|
+
"cache_directory": "executorlib_cache",
|
|
56
55
|
}
|
|
57
56
|
if resource_dict is None:
|
|
58
57
|
resource_dict = {}
|
|
@@ -61,13 +60,10 @@ class FileTaskScheduler(TaskSchedulerBase):
|
|
|
61
60
|
)
|
|
62
61
|
if execute_function == execute_in_subprocess and terminate_function is None:
|
|
63
62
|
terminate_function = terminate_subprocess
|
|
64
|
-
cache_directory_path = os.path.abspath(cache_directory)
|
|
65
|
-
os.makedirs(cache_directory_path, exist_ok=True)
|
|
66
63
|
self._process_kwargs = {
|
|
64
|
+
"resource_dict": resource_dict,
|
|
67
65
|
"future_queue": self._future_queue,
|
|
68
66
|
"execute_function": execute_function,
|
|
69
|
-
"cache_directory": cache_directory_path,
|
|
70
|
-
"resource_dict": resource_dict,
|
|
71
67
|
"terminate_function": terminate_function,
|
|
72
68
|
"pysqa_config_directory": pysqa_config_directory,
|
|
73
69
|
"backend": backend,
|
|
@@ -82,11 +78,11 @@ class FileTaskScheduler(TaskSchedulerBase):
|
|
|
82
78
|
|
|
83
79
|
|
|
84
80
|
def create_file_executor(
|
|
81
|
+
resource_dict: dict,
|
|
85
82
|
max_workers: Optional[int] = None,
|
|
86
83
|
backend: str = "flux_submission",
|
|
87
84
|
max_cores: Optional[int] = None,
|
|
88
85
|
cache_directory: Optional[str] = None,
|
|
89
|
-
resource_dict: Optional[dict] = None,
|
|
90
86
|
flux_executor=None,
|
|
91
87
|
flux_executor_pmi_mode: Optional[str] = None,
|
|
92
88
|
flux_executor_nesting: bool = False,
|
|
@@ -97,8 +93,6 @@ def create_file_executor(
|
|
|
97
93
|
init_function: Optional[Callable] = None,
|
|
98
94
|
disable_dependencies: bool = False,
|
|
99
95
|
):
|
|
100
|
-
if cache_directory is None:
|
|
101
|
-
cache_directory = "executorlib_cache"
|
|
102
96
|
if block_allocation:
|
|
103
97
|
raise ValueError(
|
|
104
98
|
"The option block_allocation is not available with the pysqa based backend."
|
|
@@ -107,6 +101,8 @@ def create_file_executor(
|
|
|
107
101
|
raise ValueError(
|
|
108
102
|
"The option to specify an init_function is not available with the pysqa based backend."
|
|
109
103
|
)
|
|
104
|
+
if cache_directory is not None:
|
|
105
|
+
resource_dict["cache_directory"] = cache_directory
|
|
110
106
|
check_flux_executor_pmi_mode(flux_executor_pmi_mode=flux_executor_pmi_mode)
|
|
111
107
|
check_max_workers_and_cores(max_cores=max_cores, max_workers=max_workers)
|
|
112
108
|
check_hostname_localhost(hostname_localhost=hostname_localhost)
|
|
@@ -114,7 +110,6 @@ def create_file_executor(
|
|
|
114
110
|
check_nested_flux_executor(nested_flux_executor=flux_executor_nesting)
|
|
115
111
|
check_flux_log_files(flux_log_files=flux_log_files)
|
|
116
112
|
return FileTaskScheduler(
|
|
117
|
-
cache_directory=cache_directory,
|
|
118
113
|
resource_dict=resource_dict,
|
|
119
114
|
pysqa_config_directory=pysqa_config_directory,
|
|
120
115
|
backend=backend.split("_submission")[0],
|
|
@@ -160,7 +160,6 @@ def _execute_task_with_cache(
|
|
|
160
160
|
resource_dict=task_dict.get("resource_dict", {}),
|
|
161
161
|
cache_key=cache_key,
|
|
162
162
|
)
|
|
163
|
-
os.makedirs(cache_directory, exist_ok=True)
|
|
164
163
|
file_name = os.path.abspath(os.path.join(cache_directory, task_key + "_o.h5"))
|
|
165
164
|
if file_name not in get_cache_files(cache_directory=cache_directory):
|
|
166
165
|
f = task_dict.pop("future")
|
|
@@ -53,12 +53,12 @@ graphnotebook = [
|
|
|
53
53
|
]
|
|
54
54
|
mpi = ["mpi4py>=3.1.4,<=4.0.1"]
|
|
55
55
|
cluster = [
|
|
56
|
-
"pysqa==0.2.
|
|
56
|
+
"pysqa==0.2.7",
|
|
57
57
|
"h5py>=3.6.0,<=3.14.0",
|
|
58
58
|
]
|
|
59
59
|
all = [
|
|
60
60
|
"mpi4py>=3.1.4,<=4.0.1",
|
|
61
|
-
"pysqa==0.2.
|
|
61
|
+
"pysqa==0.2.7",
|
|
62
62
|
"h5py>=3.6.0,<=3.14.0",
|
|
63
63
|
"pygraphviz>=1.10,<=1.14",
|
|
64
64
|
"networkx>=2.8.8,<=3.4.2",
|
|
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
|
|
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
|
{executorlib-1.5.1 → executorlib-1.5.2}/executorlib/task_scheduler/file/subprocess_spawner.py
RENAMED
|
File without changes
|
|
File without changes
|
{executorlib-1.5.1 → executorlib-1.5.2}/executorlib/task_scheduler/interactive/blockallocation.py
RENAMED
|
File without changes
|
{executorlib-1.5.1 → executorlib-1.5.2}/executorlib/task_scheduler/interactive/dependency.py
RENAMED
|
File without changes
|
{executorlib-1.5.1 → executorlib-1.5.2}/executorlib/task_scheduler/interactive/fluxspawner.py
RENAMED
|
File without changes
|
|
File without changes
|
{executorlib-1.5.1 → executorlib-1.5.2}/executorlib/task_scheduler/interactive/slurmspawner.py
RENAMED
|
File without changes
|