mirror of
https://github.com/clearml/clearml-agent
synced 2025-02-12 07:38:04 +00:00
Fix CPU mode
This commit is contained in:
parent
1260e3d942
commit
14589aa094
@ -1119,9 +1119,12 @@ class Worker(ServiceCommandSection):
|
|||||||
safe_remove_file(self.temp_config_path)
|
safe_remove_file(self.temp_config_path)
|
||||||
|
|
||||||
def _parse_dynamic_gpus(self, kwargs, queues):
|
def _parse_dynamic_gpus(self, kwargs, queues):
|
||||||
gpu_indexes = kwargs.get('gpus')
|
|
||||||
dynamic_gpus = kwargs.get('dynamic_gpus', None)
|
dynamic_gpus = kwargs.get('dynamic_gpus', None)
|
||||||
if dynamic_gpus:
|
if not dynamic_gpus:
|
||||||
|
return None, None, queues
|
||||||
|
|
||||||
|
gpu_indexes = kwargs.get('gpus')
|
||||||
|
|
||||||
# test gpus were passed correctly
|
# test gpus were passed correctly
|
||||||
if not gpu_indexes or len(gpu_indexes.split('-')) > 2 or (',' in gpu_indexes and '-' in gpu_indexes):
|
if not gpu_indexes or len(gpu_indexes.split('-')) > 2 or (',' in gpu_indexes and '-' in gpu_indexes):
|
||||||
raise ValueError('--gpus must be provided, in one of two ways: '
|
raise ValueError('--gpus must be provided, in one of two ways: '
|
||||||
|
Loading…
Reference in New Issue
Block a user