Skip to content

Commit

Permalink
Fixed issue with cuda index
Browse files Browse the repository at this point in the history
- Fixed warning with wandb
  • Loading branch information
makgyver committed Oct 4, 2024
1 parent 3b4ec98 commit 1b6dc65
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 2 additions & 2 deletions fluke/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -330,8 +330,8 @@ def set_device(self, device: str) -> torch.device:
return GlobalSettings().auto_device()

if device.startswith('cuda') and ":" in device:
idx = int(device.split(":")[1])
self._device = torch.device(device, idx)
idx = int(device.split(":")[0])
self._device = torch.device("cuda", idx)
else:
self._device = torch.device(device)
return self._device
Expand Down
2 changes: 0 additions & 2 deletions fluke/utils/log.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@
from ..comm import ChannelObserver, Message # NOQA
from . import ClientObserver, ServerObserver, get_class_from_str # NOQA

wandb.require("core")


__all__ = [
"Log",
Expand Down

0 comments on commit 1b6dc65

Please sign in to comment.