77import uuid
88
99from parsl .executors .taskvine import exec_parsl_function
10- from parsl .executors .taskvine .utils import VineTaskToParsl , run_parsl_function
10+ from parsl .executors .taskvine .utils import VineTaskToParsl
1111from parsl .process_loggers import wrap_with_logs
1212from parsl .serialize import deserialize , serialize
1313from parsl .utils import setproctitle
@@ -141,6 +141,7 @@ def _deserialize_object_from_file(path):
141141 obj = deserialize (f_in .read ())
142142 return obj
143143
144+
144145def _serialize_object_to_file (path , obj ):
145146 """Serialize an object to the given file path."""
146147 serialized_obj = serialize (obj )
@@ -149,6 +150,7 @@ def _serialize_object_to_file(path, obj):
149150 while written < len (serialized_obj ):
150151 written += f_out .write (serialized_obj [written :])
151152
153+
152154@wrap_with_logs
153155def _taskvine_submit_wait (ready_task_queue = None ,
154156 finished_task_queue = None ,
@@ -314,7 +316,8 @@ def _taskvine_submit_wait(ready_task_queue=None,
314316 libs_installed [task .func_name ] = lib_name
315317 try :
316318 # deserialize the arguments to the function call so they can be serialized again in TaskVine way.
317- # this double serialization hurts the performance of the system, but there's no way around it at the moment. Mark as TODO for future work.
319+ # this double serialization hurts the performance of the system,
320+ # but there's no way around it at the moment. Mark as TODO for future work.
318321 all_args = _deserialize_object_from_file (task .argument_file )
319322 args = all_args ['args' ]
320323 kwargs = all_args ['kwargs' ]
@@ -458,10 +461,9 @@ def _taskvine_submit_wait(ready_task_queue=None,
458461 try :
459462 if t .successful ():
460463 _serialize_object_to_file (result_file , t .output )
461- except :
464+ except Exception :
462465 is_serverless_output_ok = False
463466
464-
465467 # A tasks completes 'succesfully' if it has result file.
466468 # A check whether the Python object represented using this file can be
467469 # deserialized happens later in the collector thread of the executor
0 commit comments