Fix race condition in pipeline declaration

This commit is contained in:
allegroai 2023-04-30 15:22:52 +03:00
parent 422807555d
commit c58f8649a2

View File

@ -4164,8 +4164,6 @@ class PipelineDecorator(PipelineController):
a_pipeline._task._set_runtime_properties(
dict(multi_pipeline_counter=str(cls._multi_pipeline_call_counter)))
a_pipeline._start(wait=False)
# sync arguments back (post deserialization and casting back)
for k in pipeline_kwargs.keys():
if k in a_pipeline.get_parameters():
@ -4178,6 +4176,8 @@ class PipelineDecorator(PipelineController):
a_pipeline._task.execute_remotely(queue_name=pipeline_execution_queue)
# when we get here it means we are running remotely
a_pipeline._start(wait=False)
# this time the pipeline is executed only on the remote machine
try:
pipeline_result = func(**pipeline_kwargs)