From a6716928324f80c64ffd3f17f1cc6b8b94294b1f Mon Sep 17 00:00:00 2001 From: allegroai <> Date: Tue, 20 Apr 2021 18:11:36 +0300 Subject: [PATCH] Fix --services-mode with instance limit --- clearml_agent/commands/worker.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/clearml_agent/commands/worker.py b/clearml_agent/commands/worker.py index ade177b..f1174d1 100644 --- a/clearml_agent/commands/worker.py +++ b/clearml_agent/commands/worker.py @@ -705,7 +705,10 @@ class Worker(ServiceCommandSection): _last_machine_update_ts = 0 if self._services_mode: - max_num_instances = int(self._services_mode) + try: + max_num_instances = int(self._services_mode) if not isinstance(self._services_mode, bool) else -1 + except (ValueError, TypeError): + max_num_instances = -1 else: max_num_instances = None