chore: ruff

This commit is contained in:
psychedelicious 2024-03-27 17:32:08 +11:00 committed by Kent Keirsey
parent a291a42abc
commit a397fdbd25

View File

@ -27,10 +27,12 @@ def choose_torch_device() -> torch.device:
else: else:
return torch.device(config.device) return torch.device(config.device)
def get_torch_device_name() -> str: def get_torch_device_name() -> str:
device = choose_torch_device() device = choose_torch_device()
return torch.cuda.get_device_name(device) if device.type == "cuda" else device.type.upper() return torch.cuda.get_device_name(device) if device.type == "cuda" else device.type.upper()
# We are in transition here from using a single global AppConfig to allowing multiple # We are in transition here from using a single global AppConfig to allowing multiple
# configurations. It is strongly recommended to pass the app_config to this function. # configurations. It is strongly recommended to pass the app_config to this function.
def choose_precision( def choose_precision(