@@ -924,28 +924,39 @@ async def exec_psij(self, runnable, rerun=False):
924924 import psij
925925 import pickle
926926 import os
927+
927928 self .psij = psij
928- jex = psij .JobExecutor .get_instance (' slurm' )
929-
929+ jex = psij .JobExecutor .get_instance (" slurm" )
930+
930931 if isinstance (runnable , TaskBase ):
931932 cache_dir = runnable .cache_dir
932- file_path = os .path .join (cache_dir , ' my_function.pkl' )
933- with open (file_path , 'wb' ) as file :
933+ file_path = os .path .join (cache_dir , " my_function.pkl" )
934+ with open (file_path , "wb" ) as file :
934935 pickle .dump (runnable ._run , file )
935- spec = self .make_spec ("python3.9" , ["/pydra/pydra/engine/run_pickled_function.py" , file_path ])
936+ spec = self .make_spec (
937+ "python3.9" , ["/pydra/pydra/engine/run_pickled_function.py" , file_path ]
938+ )
936939 else : # it could be tuple that includes pickle files with tasks and inputs
937940 cache_dir = runnable [- 1 ].cache_dir
938- file_path_1 = os .path .join (cache_dir , ' my_function.pkl' )
939- file_path_2 = os .path .join (cache_dir , ' taskmain.pkl' )
940- file_path_3 = os .path .join (cache_dir , ' ind.pkl' )
941+ file_path_1 = os .path .join (cache_dir , " my_function.pkl" )
942+ file_path_2 = os .path .join (cache_dir , " taskmain.pkl" )
943+ file_path_3 = os .path .join (cache_dir , " ind.pkl" )
941944 ind , task_main_pkl , task_orig = runnable
942- with open (file_path_1 , 'wb' ) as file :
945+ with open (file_path_1 , "wb" ) as file :
943946 pickle .dump (load_and_run , file )
944- with open (file_path_2 , 'wb' ) as file :
947+ with open (file_path_2 , "wb" ) as file :
945948 pickle .dump (task_main_pkl , file )
946- with open (file_path_3 , 'wb' ) as file :
949+ with open (file_path_3 , "wb" ) as file :
947950 pickle .dump (ind , file )
948- spec = self .make_spec ("python3.9" , ["/pydra/pydra/engine/run_pickled_function_2.py" , file_path_1 , file_path_2 , file_path_3 ])
951+ spec = self .make_spec (
952+ "python3.9" ,
953+ [
954+ "/pydra/pydra/engine/run_pickled_function_2.py" ,
955+ file_path_1 ,
956+ file_path_2 ,
957+ file_path_3 ,
958+ ],
959+ )
949960
950961 job = self .make_job (spec , None )
951962 jex .submit (job )
0 commit comments