Skip to content

Commit

Permalink
fix windows issue with uname
Browse files Browse the repository at this point in the history
  • Loading branch information
mschwoer committed May 31, 2024
1 parent 11628ab commit a77e5e8
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion alphadia/libtransform.py
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,11 @@ def forward(self, input: SpecLibBase) -> SpecLibBase:
# Check if CPU or GPU/MPS should be used
device = "cpu"
if self.use_gpu:
device = "mps" if os.uname().sysname == "Darwin" else "gpu"
try:
device = "mps" if os.uname().sysname == "Darwin" else "gpu"
except AttributeError:
# Windows does not support uname
device = "gpu"

model_mgr = ModelManager(device=device)
if self.checkpoint_folder_path is not None:
Expand Down

0 comments on commit a77e5e8

Please sign in to comment.