Fix TaskScheduler does not save local state before running remotely

This commit is contained in:
allegroai 2024-01-18 17:09:42 +02:00
parent a2d1ff18d0
commit 1b80a77c92

View File

@ -385,7 +385,13 @@ class BaseScheduler(object):
:param queue: Remote queue to run the scheduler on, default 'services' queue.
"""
# make sure we serialize the current state if we are running locally
if self._task.running_locally():
self._serialize_state()
self._serialize()
# launch on the remote agent
self._task.execute_remotely(queue_name=queue, exit_process=True)
# we will be deserializing the state inside `start`
self.start()
def _update_execution_plots(self):