Skip to content

Commit 575a482

Browse files
[Feature] Store resource dict in cache (#887)
* [Feature] Store resource dict in cache * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * revert --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent 3176bb4 commit 575a482

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

  • src/executorlib/standalone

src/executorlib/standalone/hdf.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
"kwargs": "input_kwargs",
1212
"output": "output",
1313
"error": "error",
14+
"resource_dict": "resource_dict",
1415
"runtime": "runtime",
1516
"queue_id": "queue_id",
1617
"error_log_file": "error_log_file",
@@ -61,6 +62,12 @@ def load(file_name: str) -> dict:
6162
data_dict["kwargs"] = cloudpickle.loads(np.void(hdf["/input_kwargs"]))
6263
else:
6364
data_dict["kwargs"] = {}
65+
if "resource_dict" in hdf:
66+
data_dict["resource_dict"] = cloudpickle.loads(
67+
np.void(hdf["/resource_dict"])
68+
)
69+
else:
70+
data_dict["resource_dict"] = {}
6471
if "error_log_file" in hdf:
6572
data_dict["error_log_file"] = cloudpickle.loads(
6673
np.void(hdf["/error_log_file"])

0 commit comments

Comments
 (0)