fix device iteration
This commit is contained in:
parent
db06f4a9c3
commit
66c2ce3074
|
@ -159,7 +159,7 @@ class DevicePoolExecutor:
|
||||||
def get_next_device(self, needs_device: Optional[DeviceParams] = None) -> int:
|
def get_next_device(self, needs_device: Optional[DeviceParams] = None) -> int:
|
||||||
# respect overrides if possible
|
# respect overrides if possible
|
||||||
if needs_device is not None:
|
if needs_device is not None:
|
||||||
for i in self.devices:
|
for i in range(len(self.devices)):
|
||||||
if self.devices[i].device == needs_device.device:
|
if self.devices[i].device == needs_device.device:
|
||||||
return i
|
return i
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue