Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Jun 20, 2024
1 parent f8ca59f commit 379b2ce
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion examples/hetero/bipartite_sage_unsup.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
from torch_geometric.datasets import Taobao
from torch_geometric.loader import LinkNeighborLoader
from torch_geometric.nn import SAGEConv
from torch_geometric.utils.convert import to_scipy_sparse_matrix
from torch_geometric.testing.device import is_xpu_avaliable
from torch_geometric.utils.convert import to_scipy_sparse_matrix

if torch.cuda.is_available():
device = torch.device('cuda:0')
Expand Down
4 changes: 2 additions & 2 deletions examples/hetero/hierarchical_sage.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
parser.add_argument('--use-sparse-tensor', action='store_true')
args = parser.parse_args()

if args.device=='cuda' and torch.cuda.is_available():
if args.device == 'cuda' and torch.cuda.is_available():
device = 'cuda'
elif args.device=='xpu' and is_xpu_avaliable():
elif args.device == 'xpu' and is_xpu_avaliable():
device = 'xpu'
else:
device = 'cpu'
Expand Down

0 comments on commit 379b2ce

Please sign in to comment.