mirror of
https://github.com/clearml/clearml-agent
synced 2025-02-07 13:26:08 +00:00
Fix dynamic GPUs with "all" GPUs on he same worker
This commit is contained in:
parent
6e31171d31
commit
2466eed23f
@ -1124,7 +1124,13 @@ class Worker(ServiceCommandSection):
|
|||||||
raise ValueError("Dynamic GPU allocation is not supported by the ClearML-server")
|
raise ValueError("Dynamic GPU allocation is not supported by the ClearML-server")
|
||||||
available_gpus = [prop["value"] for prop in available_gpus if prop["key"] == 'available_gpus']
|
available_gpus = [prop["value"] for prop in available_gpus if prop["key"] == 'available_gpus']
|
||||||
if available_gpus:
|
if available_gpus:
|
||||||
available_gpus = [int(g) for g in available_gpus[-1].split(',')]
|
gpus = []
|
||||||
|
for g in available_gpus[-1].split(','):
|
||||||
|
try:
|
||||||
|
gpus += [int(g.strip())]
|
||||||
|
except (ValueError, TypeError):
|
||||||
|
print("INFO: failed parsing GPU int('{}') - skipping".format(g))
|
||||||
|
available_gpus = gpus
|
||||||
if not isinstance(gpu_queues, dict):
|
if not isinstance(gpu_queues, dict):
|
||||||
gpu_queues = dict(gpu_queues)
|
gpu_queues = dict(gpu_queues)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user