Skip to content

Commit cc46c13

Browse files
authored
Fixed errors installing with pip (#126)
1 parent c262603 commit cc46c13

File tree

3 files changed

+4
-6
lines changed

3 files changed

+4
-6
lines changed

src/pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ classifiers = [
99
"Programming Language :: Python :: 3",
1010
"Operating System :: POSIX :: Linux",
1111
]
12-
dependencies = ["torch==2.5.1.*"]
12+
dependencies = ["torch"]
1313

1414

1515
[project.urls]
@@ -26,5 +26,5 @@ include-package-data = false
2626
NNPOps = "pytorch"
2727

2828
[build-system]
29-
requires = ["setuptools>=64", "setuptools-scm>=8", "torch==2.5.1.*"]
29+
requires = ["setuptools>=64", "setuptools-scm>=8", "torch"]
3030
build-backend = "setuptools.build_meta"

src/pytorch/OptimizedTorchANI.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,7 @@
3232

3333
class OptimizedTorchANI(torch.nn.Module):
3434

35-
from torchani.models import BuiltinModel # https://github.com/openmm/NNPOps/issues/44
36-
37-
def __init__(self, model: BuiltinModel, atomicNumbers: Tensor) -> None:
35+
def __init__(self, model, atomicNumbers: Tensor) -> None:
3836

3937
super().__init__()
4038

src/setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ def set_torch_cuda_arch_list():
2626
if use_cuda and not os.environ.get("TORCH_CUDA_ARCH_LIST"):
2727
arch_flags = torch._C._cuda_getArchFlags()
2828
sm_versions = [x[3:] for x in arch_flags.split() if x.startswith("sm_")]
29-
formatted_versions = ";".join([f"{y[0]}.{y[1]}" for y in sm_versions])
29+
formatted_versions = ";".join([f"{y[:-1]}.{y[-1]}" for y in sm_versions])
3030
formatted_versions += "+PTX"
3131
os.environ["TORCH_CUDA_ARCH_LIST"] = formatted_versions
3232

0 commit comments

Comments
 (0)