From 12a8872b27d120eb1d67661caa294905a7d126fe Mon Sep 17 00:00:00 2001 From: allegroai <> Date: Mon, 1 Aug 2022 18:56:37 +0300 Subject: [PATCH] Fix Python 3.10+ support --- 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 8cfd53b..e8e179b 100644 --- a/clearml_agent/commands/worker.py +++ b/clearml_agent/commands/worker.py @@ -2024,7 +2024,10 @@ class Worker(ServiceCommandSection): python_ver = task.script.binary python_ver = python_ver.split('/')[-1].replace('python', '') # if we can cast it, we are good - return '{:.1f}'.format(float(python_ver)) + return '{}.{}'.format( + int(python_ver.partition(".")[0]), + int(python_ver.partition(".")[-1].partition(".")[0] or 0) + ) except Exception: pass