1
0
Fork 0

format devices in logs

This commit is contained in:
Sean Sube 2023-02-04 13:56:17 -06:00
parent a212d954eb
commit 2c9a10e2b7
Signed by: ssube
GPG Key ID: 3EED7B957D362AF1
1 changed files with 3 additions and 0 deletions

View File

@ -65,6 +65,9 @@ class DeviceParams:
self.provider = provider
self.options = options
def __str__(self) -> str:
return '%s - %s' % (self.device, self.provider)
def torch_device(self) -> str:
if self.device.startswith('cuda'):
return self.device