Skip to content

Commit cfead27

Browse files
committed
updated the location of run_pickled to scripts dir
1 parent 8ed417c commit cfead27

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

pydra/workers/psij_local/__init__.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
import typing as ty
2-
from pathlib import Path
32
import cloudpickle as cp
43
import logging
54
import attrs
65
import psij
76
from pydra.engine.job import Job
87
from pydra.workers import base
8+
from pydra.utils.general import SCRIPTS_DIR
99

1010
logger = logging.getLogger("pydra.worker")
1111

@@ -79,13 +79,12 @@ async def run(
7979
None
8080
"""
8181
jex = psij.JobExecutor.get_instance(self.subtype)
82-
absolute_path = Path(__file__).parent
8382

8483
cache_dir = job.cache_dir
8584
file_path = cache_dir / "runnable_function.pkl"
8685
with open(file_path, "wb") as file:
8786
cp.dump(job.run, file)
88-
func_path = absolute_path / "run_pickled.py"
87+
func_path = SCRIPTS_DIR / "run_pickled.py"
8988
spec = self.make_spec("python", [func_path, file_path])
9089

9190
if rerun:

0 commit comments

Comments
 (0)