executorlib 1.9.4__tar.gz → 1.10.1__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.
Files changed (51) hide show
  1. {executorlib-1.9.4 → executorlib-1.10.1}/PKG-INFO +33 -4
  2. {executorlib-1.9.4 → executorlib-1.10.1}/README.md +28 -0
  3. {executorlib-1.9.4 → executorlib-1.10.1}/pyproject.toml +4 -3
  4. {executorlib-1.9.4 → executorlib-1.10.1}/src/executorlib/_version.py +2 -2
  5. {executorlib-1.9.4 → executorlib-1.10.1}/src/executorlib/backend/interactive_serial.py +2 -2
  6. {executorlib-1.9.4 → executorlib-1.10.1}/src/executorlib/standalone/hdf.py +14 -11
  7. {executorlib-1.9.4 → executorlib-1.10.1}/src/executorlib/task_scheduler/interactive/spawner_pysqa.py +1 -3
  8. {executorlib-1.9.4 → executorlib-1.10.1}/.gitignore +0 -0
  9. {executorlib-1.9.4 → executorlib-1.10.1}/LICENSE +0 -0
  10. {executorlib-1.9.4 → executorlib-1.10.1}/src/executorlib/__init__.py +0 -0
  11. {executorlib-1.9.4 → executorlib-1.10.1}/src/executorlib/api.py +0 -0
  12. {executorlib-1.9.4 → executorlib-1.10.1}/src/executorlib/backend/__init__.py +0 -0
  13. {executorlib-1.9.4 → executorlib-1.10.1}/src/executorlib/backend/cache_parallel.py +0 -0
  14. {executorlib-1.9.4 → executorlib-1.10.1}/src/executorlib/backend/cache_serial.py +0 -0
  15. {executorlib-1.9.4 → executorlib-1.10.1}/src/executorlib/backend/interactive_parallel.py +0 -0
  16. {executorlib-1.9.4 → executorlib-1.10.1}/src/executorlib/executor/__init__.py +0 -0
  17. {executorlib-1.9.4 → executorlib-1.10.1}/src/executorlib/executor/base.py +0 -0
  18. {executorlib-1.9.4 → executorlib-1.10.1}/src/executorlib/executor/flux.py +0 -0
  19. {executorlib-1.9.4 → executorlib-1.10.1}/src/executorlib/executor/single.py +0 -0
  20. {executorlib-1.9.4 → executorlib-1.10.1}/src/executorlib/executor/slurm.py +0 -0
  21. {executorlib-1.9.4 → executorlib-1.10.1}/src/executorlib/standalone/__init__.py +0 -0
  22. {executorlib-1.9.4 → executorlib-1.10.1}/src/executorlib/standalone/batched.py +0 -0
  23. {executorlib-1.9.4 → executorlib-1.10.1}/src/executorlib/standalone/command.py +0 -0
  24. {executorlib-1.9.4 → executorlib-1.10.1}/src/executorlib/standalone/error.py +0 -0
  25. {executorlib-1.9.4 → executorlib-1.10.1}/src/executorlib/standalone/inputcheck.py +0 -0
  26. {executorlib-1.9.4 → executorlib-1.10.1}/src/executorlib/standalone/interactive/__init__.py +0 -0
  27. {executorlib-1.9.4 → executorlib-1.10.1}/src/executorlib/standalone/interactive/arguments.py +0 -0
  28. {executorlib-1.9.4 → executorlib-1.10.1}/src/executorlib/standalone/interactive/backend.py +0 -0
  29. {executorlib-1.9.4 → executorlib-1.10.1}/src/executorlib/standalone/interactive/communication.py +0 -0
  30. {executorlib-1.9.4 → executorlib-1.10.1}/src/executorlib/standalone/interactive/spawner.py +0 -0
  31. {executorlib-1.9.4 → executorlib-1.10.1}/src/executorlib/standalone/queue.py +0 -0
  32. {executorlib-1.9.4 → executorlib-1.10.1}/src/executorlib/standalone/scheduler.py +0 -0
  33. {executorlib-1.9.4 → executorlib-1.10.1}/src/executorlib/standalone/select.py +0 -0
  34. {executorlib-1.9.4 → executorlib-1.10.1}/src/executorlib/standalone/serialize.py +0 -0
  35. {executorlib-1.9.4 → executorlib-1.10.1}/src/executorlib/standalone/validate.py +0 -0
  36. {executorlib-1.9.4 → executorlib-1.10.1}/src/executorlib/task_scheduler/__init__.py +0 -0
  37. {executorlib-1.9.4 → executorlib-1.10.1}/src/executorlib/task_scheduler/base.py +0 -0
  38. {executorlib-1.9.4 → executorlib-1.10.1}/src/executorlib/task_scheduler/file/__init__.py +0 -0
  39. {executorlib-1.9.4 → executorlib-1.10.1}/src/executorlib/task_scheduler/file/backend.py +0 -0
  40. {executorlib-1.9.4 → executorlib-1.10.1}/src/executorlib/task_scheduler/file/shared.py +0 -0
  41. {executorlib-1.9.4 → executorlib-1.10.1}/src/executorlib/task_scheduler/file/spawner_pysqa.py +0 -0
  42. {executorlib-1.9.4 → executorlib-1.10.1}/src/executorlib/task_scheduler/file/spawner_subprocess.py +0 -0
  43. {executorlib-1.9.4 → executorlib-1.10.1}/src/executorlib/task_scheduler/file/task_scheduler.py +0 -0
  44. {executorlib-1.9.4 → executorlib-1.10.1}/src/executorlib/task_scheduler/interactive/__init__.py +0 -0
  45. {executorlib-1.9.4 → executorlib-1.10.1}/src/executorlib/task_scheduler/interactive/blockallocation.py +0 -0
  46. {executorlib-1.9.4 → executorlib-1.10.1}/src/executorlib/task_scheduler/interactive/dependency.py +0 -0
  47. {executorlib-1.9.4 → executorlib-1.10.1}/src/executorlib/task_scheduler/interactive/dependency_plot.py +0 -0
  48. {executorlib-1.9.4 → executorlib-1.10.1}/src/executorlib/task_scheduler/interactive/onetoone.py +0 -0
  49. {executorlib-1.9.4 → executorlib-1.10.1}/src/executorlib/task_scheduler/interactive/shared.py +0 -0
  50. {executorlib-1.9.4 → executorlib-1.10.1}/src/executorlib/task_scheduler/interactive/spawner_flux.py +0 -0
  51. {executorlib-1.9.4 → executorlib-1.10.1}/src/executorlib/task_scheduler/interactive/spawner_slurm.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: executorlib
3
- Version: 1.9.4
3
+ Version: 1.10.1
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
@@ -45,8 +45,9 @@ Classifier: Programming Language :: Python :: 3.10
45
45
  Classifier: Programming Language :: Python :: 3.11
46
46
  Classifier: Programming Language :: Python :: 3.12
47
47
  Classifier: Programming Language :: Python :: 3.13
48
+ Classifier: Programming Language :: Python :: 3.14
48
49
  Classifier: Topic :: Scientific/Engineering :: Physics
49
- Requires-Python: <3.14,>3.9
50
+ Requires-Python: <3.15,>3.9
50
51
  Requires-Dist: cloudpickle<=3.1.2,>=2.0.0
51
52
  Requires-Dist: pyzmq<=27.1.0,>=25.0.0
52
53
  Provides-Extra: all
@@ -56,12 +57,12 @@ Requires-Dist: mpi4py<=4.1.2,>=3.1.4; extra == 'all'
56
57
  Requires-Dist: networkx<=3.6.1,>=2.8.8; extra == 'all'
57
58
  Requires-Dist: pydantic<=2.13.4,>=2.5.3; extra == 'all'
58
59
  Requires-Dist: pygraphviz<=1.14,>=1.10; extra == 'all'
59
- Requires-Dist: pysqa==0.4.2; extra == 'all'
60
+ Requires-Dist: pysqa==0.4.3; extra == 'all'
60
61
  Provides-Extra: cache
61
62
  Requires-Dist: h5py<=3.16.0,>=3.6.0; extra == 'cache'
62
63
  Provides-Extra: cluster
63
64
  Requires-Dist: h5py<=3.16.0,>=3.6.0; extra == 'cluster'
64
- Requires-Dist: pysqa==0.4.2; extra == 'cluster'
65
+ Requires-Dist: pysqa==0.4.3; extra == 'cluster'
65
66
  Provides-Extra: graph
66
67
  Requires-Dist: networkx<=3.6.1,>=2.8.8; extra == 'graph'
67
68
  Requires-Dist: pygraphviz<=1.14,>=1.10; extra == 'graph'
@@ -218,6 +219,25 @@ given allocation. Even when [SLURM](https://slurm.schedmd.com) is used as primar
218
219
  recommended to use [SLURM with flux](https://executorlib.readthedocs.io/en/latest/3-hpc-job.html#slurm-with-flux)
219
220
  as hierarchical job scheduler within the allocations.
220
221
 
222
+ ## Which Executor should I use?
223
+ executorlib provides five `Executor` classes. They all share the same `submit()` / `map()` interface and only differ in
224
+ *where* the Python functions are executed and *how* the resources are requested. A common workflow is to develop and
225
+ test with the `SingleNodeExecutor` on a laptop and then switch to one of the HPC executors by changing only the class
226
+ name:
227
+
228
+ | Executor | Where it runs | Scheduler command | Best for |
229
+ |---|---|---|---|
230
+ | [`SingleNodeExecutor`](https://executorlib.readthedocs.io/en/latest/1-single-node.html) | laptop, workstation or single compute node | `subprocess` | developing and testing a workflow |
231
+ | [`SlurmClusterExecutor`](https://executorlib.readthedocs.io/en/latest/2-hpc-cluster.html#slurm) | HPC login node | `sbatch` (one job per function) | long-running functions that should outlive the Python session |
232
+ | [`SlurmJobExecutor`](https://executorlib.readthedocs.io/en/latest/3-hpc-job.html#slurm) | inside a SLURM allocation | `srun` (job steps) | many functions within one existing allocation |
233
+ | [`FluxClusterExecutor`](https://executorlib.readthedocs.io/en/latest/2-hpc-cluster.html#flux) | HPC login node or Flux instance | `flux submit` | long-running functions; disconnecting and reconnecting |
234
+ | [`FluxJobExecutor`](https://executorlib.readthedocs.io/en/latest/3-hpc-job.html#flux) | inside a Flux allocation | `flux run` | high-throughput execution of many short functions |
235
+
236
+ The **Cluster** executors submit each Python function as an individual job and communicate via the file system, so the
237
+ Python process which created the executor can be closed and the results reloaded later. The **Job** executors run inside
238
+ an existing allocation and communicate via sockets, which has lower overhead and is the better choice for many short
239
+ function calls.
240
+
221
241
  ## Documentation
222
242
  * [Installation](https://executorlib.readthedocs.io/en/latest/installation.html)
223
243
  * [Minimal](https://executorlib.readthedocs.io/en/latest/installation.html#minimal)
@@ -243,6 +263,9 @@ as hierarchical job scheduler within the allocations.
243
263
  * [HPC Cluster Executor](https://executorlib.readthedocs.io/en/latest/2-hpc-cluster.html)
244
264
  * [SLURM](https://executorlib.readthedocs.io/en/latest/2-hpc-cluster.html#slurm)
245
265
  * [Flux](https://executorlib.readthedocs.io/en/latest/2-hpc-cluster.html#flux)
266
+ * [Disconnecting and Reconnecting](https://executorlib.readthedocs.io/en/latest/2-hpc-cluster.html#disconnecting-and-reconnecting)
267
+ * [Combine both](https://executorlib.readthedocs.io/en/latest/2-hpc-cluster.html#combine-both)
268
+ * [Cleaning Cache](https://executorlib.readthedocs.io/en/latest/2-hpc-cluster.html#cleaning-cache)
246
269
  * [HPC Job Executor](https://executorlib.readthedocs.io/en/latest/3-hpc-job.html)
247
270
  * [SLURM](https://executorlib.readthedocs.io/en/latest/3-hpc-job.html#slurm)
248
271
  * [SLURM with Flux](https://executorlib.readthedocs.io/en/latest/3-hpc-job.html#slurm-with-flux)
@@ -250,6 +273,12 @@ as hierarchical job scheduler within the allocations.
250
273
  * [Application](https://executorlib.readthedocs.io/en/latest/application.html)
251
274
  * [GPAW](https://executorlib.readthedocs.io/en/latest/4-1-gpaw.html)
252
275
  * [Quantum Espresso](https://executorlib.readthedocs.io/en/latest/4-2-quantum-espresso.html)
276
+ * [Integration](https://executorlib.readthedocs.io/en/latest/coupling.html)
277
+ * [emcee](https://executorlib.readthedocs.io/en/latest/coupling.html#emcee)
278
+ * [pipefunc](https://executorlib.readthedocs.io/en/latest/coupling.html#pipefunc)
279
+ * [omp4py](https://executorlib.readthedocs.io/en/latest/coupling.html#omp4py)
280
+ * [pylammpsmpi](https://executorlib.readthedocs.io/en/latest/coupling.html#pylammpsmpi)
281
+ * [General Pattern](https://executorlib.readthedocs.io/en/latest/coupling.html#general-pattern)
253
282
  * [Trouble Shooting](https://executorlib.readthedocs.io/en/latest/trouble_shooting.html)
254
283
  * [Filesystem Usage](https://executorlib.readthedocs.io/en/latest/trouble_shooting.html#filesystem-usage)
255
284
  * [Firewall Issues](https://executorlib.readthedocs.io/en/latest/trouble_shooting.html#firewall-issues)
@@ -141,6 +141,25 @@ given allocation. Even when [SLURM](https://slurm.schedmd.com) is used as primar
141
141
  recommended to use [SLURM with flux](https://executorlib.readthedocs.io/en/latest/3-hpc-job.html#slurm-with-flux)
142
142
  as hierarchical job scheduler within the allocations.
143
143
 
144
+ ## Which Executor should I use?
145
+ executorlib provides five `Executor` classes. They all share the same `submit()` / `map()` interface and only differ in
146
+ *where* the Python functions are executed and *how* the resources are requested. A common workflow is to develop and
147
+ test with the `SingleNodeExecutor` on a laptop and then switch to one of the HPC executors by changing only the class
148
+ name:
149
+
150
+ | Executor | Where it runs | Scheduler command | Best for |
151
+ |---|---|---|---|
152
+ | [`SingleNodeExecutor`](https://executorlib.readthedocs.io/en/latest/1-single-node.html) | laptop, workstation or single compute node | `subprocess` | developing and testing a workflow |
153
+ | [`SlurmClusterExecutor`](https://executorlib.readthedocs.io/en/latest/2-hpc-cluster.html#slurm) | HPC login node | `sbatch` (one job per function) | long-running functions that should outlive the Python session |
154
+ | [`SlurmJobExecutor`](https://executorlib.readthedocs.io/en/latest/3-hpc-job.html#slurm) | inside a SLURM allocation | `srun` (job steps) | many functions within one existing allocation |
155
+ | [`FluxClusterExecutor`](https://executorlib.readthedocs.io/en/latest/2-hpc-cluster.html#flux) | HPC login node or Flux instance | `flux submit` | long-running functions; disconnecting and reconnecting |
156
+ | [`FluxJobExecutor`](https://executorlib.readthedocs.io/en/latest/3-hpc-job.html#flux) | inside a Flux allocation | `flux run` | high-throughput execution of many short functions |
157
+
158
+ The **Cluster** executors submit each Python function as an individual job and communicate via the file system, so the
159
+ Python process which created the executor can be closed and the results reloaded later. The **Job** executors run inside
160
+ an existing allocation and communicate via sockets, which has lower overhead and is the better choice for many short
161
+ function calls.
162
+
144
163
  ## Documentation
145
164
  * [Installation](https://executorlib.readthedocs.io/en/latest/installation.html)
146
165
  * [Minimal](https://executorlib.readthedocs.io/en/latest/installation.html#minimal)
@@ -166,6 +185,9 @@ as hierarchical job scheduler within the allocations.
166
185
  * [HPC Cluster Executor](https://executorlib.readthedocs.io/en/latest/2-hpc-cluster.html)
167
186
  * [SLURM](https://executorlib.readthedocs.io/en/latest/2-hpc-cluster.html#slurm)
168
187
  * [Flux](https://executorlib.readthedocs.io/en/latest/2-hpc-cluster.html#flux)
188
+ * [Disconnecting and Reconnecting](https://executorlib.readthedocs.io/en/latest/2-hpc-cluster.html#disconnecting-and-reconnecting)
189
+ * [Combine both](https://executorlib.readthedocs.io/en/latest/2-hpc-cluster.html#combine-both)
190
+ * [Cleaning Cache](https://executorlib.readthedocs.io/en/latest/2-hpc-cluster.html#cleaning-cache)
169
191
  * [HPC Job Executor](https://executorlib.readthedocs.io/en/latest/3-hpc-job.html)
170
192
  * [SLURM](https://executorlib.readthedocs.io/en/latest/3-hpc-job.html#slurm)
171
193
  * [SLURM with Flux](https://executorlib.readthedocs.io/en/latest/3-hpc-job.html#slurm-with-flux)
@@ -173,6 +195,12 @@ as hierarchical job scheduler within the allocations.
173
195
  * [Application](https://executorlib.readthedocs.io/en/latest/application.html)
174
196
  * [GPAW](https://executorlib.readthedocs.io/en/latest/4-1-gpaw.html)
175
197
  * [Quantum Espresso](https://executorlib.readthedocs.io/en/latest/4-2-quantum-espresso.html)
198
+ * [Integration](https://executorlib.readthedocs.io/en/latest/coupling.html)
199
+ * [emcee](https://executorlib.readthedocs.io/en/latest/coupling.html#emcee)
200
+ * [pipefunc](https://executorlib.readthedocs.io/en/latest/coupling.html#pipefunc)
201
+ * [omp4py](https://executorlib.readthedocs.io/en/latest/coupling.html#omp4py)
202
+ * [pylammpsmpi](https://executorlib.readthedocs.io/en/latest/coupling.html#pylammpsmpi)
203
+ * [General Pattern](https://executorlib.readthedocs.io/en/latest/coupling.html#general-pattern)
176
204
  * [Trouble Shooting](https://executorlib.readthedocs.io/en/latest/trouble_shooting.html)
177
205
  * [Filesystem Usage](https://executorlib.readthedocs.io/en/latest/trouble_shooting.html#filesystem-usage)
178
206
  * [Firewall Issues](https://executorlib.readthedocs.io/en/latest/trouble_shooting.html#firewall-issues)
@@ -16,7 +16,7 @@ authors = [
16
16
  readme = "README.md"
17
17
  license = { file = "LICENSE" }
18
18
  keywords = ["high performance computing", "hpc", "task scheduler", "slurm", "flux-framework", "executor", "python", "parallel computing", "distributed computing", "scientific computing", "concurrent.futures", "mpi4py", "gpu"]
19
- requires-python = ">3.9, <3.14"
19
+ requires-python = ">3.9, <3.15"
20
20
  classifiers = [
21
21
  "Development Status :: 5 - Production/Stable",
22
22
  "Topic :: Scientific/Engineering :: Physics",
@@ -27,6 +27,7 @@ classifiers = [
27
27
  "Programming Language :: Python :: 3.11",
28
28
  "Programming Language :: Python :: 3.12",
29
29
  "Programming Language :: Python :: 3.13",
30
+ "Programming Language :: Python :: 3.14",
30
31
  ]
31
32
  dependencies = [
32
33
  "cloudpickle>=2.0.0,<=3.1.2",
@@ -52,7 +53,7 @@ graphnotebook = [
52
53
  ]
53
54
  mpi = ["mpi4py>=3.1.4,<=4.1.2"]
54
55
  cluster = [
55
- "pysqa==0.4.2",
56
+ "pysqa==0.4.3",
56
57
  "h5py>=3.6.0,<=3.16.0",
57
58
  ]
58
59
  validation = [
@@ -60,7 +61,7 @@ validation = [
60
61
  ]
61
62
  all = [
62
63
  "mpi4py>=3.1.4,<=4.1.2",
63
- "pysqa==0.4.2",
64
+ "pysqa==0.4.3",
64
65
  "h5py>=3.6.0,<=3.16.0",
65
66
  "pydantic>=2.5.3,<=2.13.4",
66
67
  "pygraphviz>=1.10,<=1.14",
@@ -18,7 +18,7 @@ version_tuple: tuple[int | str, ...]
18
18
  commit_id: str | None
19
19
  __commit_id__: str | None
20
20
 
21
- __version__ = version = '1.9.4'
22
- __version_tuple__ = version_tuple = (1, 9, 4)
21
+ __version__ = version = '1.10.1'
22
+ __version_tuple__ = version_tuple = (1, 10, 1)
23
23
 
24
24
  __commit_id__ = commit_id = None
@@ -12,7 +12,7 @@ from executorlib.standalone.interactive.communication import (
12
12
  )
13
13
 
14
14
 
15
- def main(argument_lst: Optional[list[str]] = None):
15
+ def evaluate_cmd(argument_lst: Optional[list[str]] = None):
16
16
  """
17
17
  The main function of the program.
18
18
 
@@ -90,4 +90,4 @@ def main(argument_lst: Optional[list[str]] = None):
90
90
 
91
91
 
92
92
  if __name__ == "__main__":
93
- main(argument_lst=sys.argv)
93
+ evaluate_cmd(argument_lst=sys.argv)
@@ -38,7 +38,10 @@ def dump(file_name: Optional[str], data_dict: dict) -> None:
38
38
  with contextlib.suppress(ValueError):
39
39
  fname.create_dataset(
40
40
  name="/" + group_dict[data_key],
41
- data=np.void(cloudpickle.dumps(data_value)),
41
+ data=np.frombuffer(
42
+ cloudpickle.dumps(data_value), dtype=np.uint8
43
+ ),
44
+ compression="gzip",
42
45
  )
43
46
 
44
47
 
@@ -55,26 +58,26 @@ def load(file_name: str) -> dict:
55
58
  with h5py.File(file_name, "r") as hdf:
56
59
  data_dict = {}
57
60
  if "function" in hdf:
58
- data_dict["fn"] = cloudpickle.loads(np.void(hdf["/function"]))
61
+ data_dict["fn"] = cloudpickle.loads(hdf["/function"][()].tobytes())
59
62
  else:
60
63
  raise TypeError("Function not found in HDF5 file.")
61
64
  if "input_args" in hdf:
62
- data_dict["args"] = cloudpickle.loads(np.void(hdf["/input_args"]))
65
+ data_dict["args"] = cloudpickle.loads(hdf["/input_args"][()].tobytes())
63
66
  else:
64
67
  data_dict["args"] = ()
65
68
  if "input_kwargs" in hdf:
66
- data_dict["kwargs"] = cloudpickle.loads(np.void(hdf["/input_kwargs"]))
69
+ data_dict["kwargs"] = cloudpickle.loads(hdf["/input_kwargs"][()].tobytes())
67
70
  else:
68
71
  data_dict["kwargs"] = {}
69
72
  if "resource_dict" in hdf:
70
73
  data_dict["resource_dict"] = cloudpickle.loads(
71
- np.void(hdf["/resource_dict"])
74
+ hdf["/resource_dict"][()].tobytes()
72
75
  )
73
76
  else:
74
77
  data_dict["resource_dict"] = {}
75
78
  if "error_log_file" in hdf:
76
79
  data_dict["error_log_file"] = cloudpickle.loads(
77
- np.void(hdf["/error_log_file"])
80
+ hdf["/error_log_file"][()].tobytes()
78
81
  )
79
82
  return data_dict
80
83
 
@@ -93,9 +96,9 @@ def get_output(file_name: str) -> tuple[bool, bool, Any]:
93
96
  def get_output_helper(file_name: str) -> tuple[bool, bool, Any]:
94
97
  with h5py.File(file_name, "r") as hdf:
95
98
  if "output" in hdf:
96
- return True, True, cloudpickle.loads(np.void(hdf["/output"]))
99
+ return True, True, cloudpickle.loads(hdf["/output"][()].tobytes())
97
100
  elif "error" in hdf:
98
- return True, False, cloudpickle.loads(np.void(hdf["/error"]))
101
+ return True, False, cloudpickle.loads(hdf["/error"][()].tobytes())
99
102
  else:
100
103
  return False, False, None
101
104
 
@@ -122,7 +125,7 @@ def get_runtime(file_name: str) -> float:
122
125
  """
123
126
  with h5py.File(file_name, "r") as hdf:
124
127
  if "runtime" in hdf:
125
- return cloudpickle.loads(np.void(hdf["/runtime"]))
128
+ return cloudpickle.loads(hdf["/runtime"][()].tobytes())
126
129
  else:
127
130
  return 0.0
128
131
 
@@ -140,7 +143,7 @@ def get_queue_id(file_name: Optional[str]) -> Optional[int]:
140
143
  if file_name is not None and os.path.exists(file_name):
141
144
  with h5py.File(file_name, "r") as hdf:
142
145
  if "queue_id" in hdf:
143
- return cloudpickle.loads(np.void(hdf["/queue_id"]))
146
+ return cloudpickle.loads(hdf["/queue_id"][()].tobytes())
144
147
  return None
145
148
 
146
149
 
@@ -230,7 +233,7 @@ def _get_content_of_file(file_name: str) -> dict:
230
233
  """
231
234
  with h5py.File(file_name, "r") as hdf:
232
235
  return {
233
- key: cloudpickle.loads(np.void(hdf["/" + key]))
236
+ key: cloudpickle.loads(hdf["/" + key][()].tobytes())
234
237
  for key in group_dict.values()
235
238
  if key in hdf
236
239
  }
@@ -189,7 +189,7 @@ class PysqaSpawner(BaseSpawner):
189
189
  if self._cwd is not None:
190
190
  working_directory = os.path.join(self._cwd, hash)
191
191
  else:
192
- working_directory = os.path.abspath(hash)
192
+ working_directory = os.path.join(os.path.abspath("executorlib_cache"), hash)
193
193
  set_current_directory_in_environment()
194
194
  return queue_adapter.submit_job(
195
195
  command=" ".join(self.generate_command(command_lst=command_lst)),
@@ -242,8 +242,6 @@ def create_pysqa_block_allocation_scheduler(
242
242
  executor_kwargs["cwd"] = os.path.abspath(cache_directory)
243
243
  if cache_directory is not None:
244
244
  executor_kwargs["cache_directory"] = os.path.abspath(cache_directory)
245
- else:
246
- executor_kwargs["cache_directory"] = os.path.abspath(".")
247
245
  executor_kwargs["hostname_localhost"] = hostname_localhost
248
246
  executor_kwargs["log_obj_size"] = log_obj_size
249
247
  executor_kwargs["pmi_mode"] = pmi_mode
File without changes
File without changes