Skip to content

Commit

Permalink
fix mps check
Browse files Browse the repository at this point in the history
  • Loading branch information
k-dominik committed Jun 28, 2023
1 parent 7d32f7c commit 6e91b76
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
repos:
- repo: https://github.com/ambv/black
rev: 22.1.0
rev: 23.3.0
hooks:
- id: black
language_version: python3.7
language_version: python3.9
exclude: (.*_pb2.py|.*_pb2_grpc.py)
- repo: https://github.com/timothycrosley/isort
rev: 5.10.1
rev: 5.12.0
hooks:
- id: isort
- repo: https://github.com/pycqa/flake8
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[tool.black]
line-length = 120
target-version = ['py37']
target-version = ['py39']
exclude = '(vendor|.*_pb2.py|.*_pb2_grpc.py)'
2 changes: 1 addition & 1 deletion tiktorch/server/device_pool.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ def list_devices(self) -> List[IDevice]:
if torch.cuda.is_available():
ids += [f"cuda:{idx}" for idx in range(torch.cuda.device_count())]
try:
if torch.backends.mps.is_available:
if torch.backends.mps.is_available():
ids += ["mps"]
except AttributeError:
pass
Expand Down

0 comments on commit 6e91b76

Please sign in to comment.