mirror of
https://github.com/clearml/clearml-agent
synced 2025-03-03 10:42:05 +00:00
Fix Python 3.10+ support
This commit is contained in:
parent
820ab4dc0c
commit
12a8872b27
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user