From 1b80a77c92e95c58075e11a33211609b9fb7b7d7 Mon Sep 17 00:00:00 2001 From: allegroai <> Date: Thu, 18 Jan 2024 17:09:42 +0200 Subject: [PATCH] Fix TaskScheduler does not save local state before running remotely --- clearml/automation/scheduler.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/clearml/automation/scheduler.py b/clearml/automation/scheduler.py index bf24b55e..d09e52ee 100644 --- a/clearml/automation/scheduler.py +++ b/clearml/automation/scheduler.py @@ -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):