From e9f950f939ff5413025f6300ac6cd0afff118b64 Mon Sep 17 00:00:00 2001 From: allegroai <> Date: Thu, 30 Jul 2020 14:34:39 +0300 Subject: [PATCH] Fix set_base_docker() on main task to do nothing when running remotely --- trains/task.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/trains/task.py b/trains/task.py index 35ed8d05..0bba0743 100644 --- a/trains/task.py +++ b/trains/task.py @@ -1434,6 +1434,18 @@ class Task(_Task): """ self._arguments.copy_from_dict(flatten_dictionary(dictionary)) + def set_base_docker(self, docker_cmd): + # type: (str) -> () + """ + Set the base docker image for this experiment + If provided, this value will be used by trains-agent to execute this experiment + inside the provided docker image. + """ + if not self.running_locally() and self.is_main_task(): + return + + super(Task, self).set_base_docker(docker_cmd) + def execute_remotely(self, queue_name=None, clone=False, exit_process=True): # type: (Optional[str], bool, bool) -> () """