Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update torch requirement from <1.14.0,>=1.7.0 to >=1.7.0,<3.0.0 #758

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions alibi_detect/od/pytorch/knn.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ def __init__(
self.ks = torch.tensor(k) if self.ensemble else torch.tensor([k], device=self.device)
self.ensembler = ensembler

@torch.no_grad()
def forward(self, x: torch.Tensor) -> torch.Tensor:
"""Detect if `x` is an outlier.

Expand All @@ -67,7 +66,6 @@ def forward(self, x: torch.Tensor) -> torch.Tensor:
preds = scores > self.threshold
return preds

@torch.no_grad()
def score(self, x: torch.Tensor) -> torch.Tensor:
"""Computes the score of `x`

Expand Down
2 changes: 0 additions & 2 deletions alibi_detect/od/pytorch/mahalanobis.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ def __init__(
super().__init__(device=device)
self.min_eigenvalue = min_eigenvalue

@torch.no_grad()
def forward(self, x: torch.Tensor) -> torch.Tensor:
"""Detect if `x` is an outlier.

Expand All @@ -50,7 +49,6 @@ def forward(self, x: torch.Tensor) -> torch.Tensor:
preds = scores > self.threshold
return preds

@torch.no_grad()
def score(self, x: torch.Tensor) -> torch.Tensor:
"""Computes the score of `x`

Expand Down
6 changes: 3 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ def readme():
"prophet>=1.1.0, <2.0.0",
],
"torch": [
"torch>=1.7.0, <1.14.0"
"torch>=1.7.0, <3.0.0"
],
# https://github.com/SeldonIO/alibi-detect/issues/375 and 387
"tensorflow": [
Expand All @@ -23,14 +23,14 @@ def readme():
],
"keops": [
"pykeops>=2.0.0, <2.2.0",
"torch>=1.7.0, <1.14.0"
"torch>=1.7.0, <3.0.0"
],
"all": [
"prophet>=1.1.0, <2.0.0",
"tensorflow_probability>=0.8.0, <0.20.0",
"tensorflow>=2.2.0, !=2.6.0, !=2.6.1, <2.13.0", # https://github.com/SeldonIO/alibi-detect/issues/375 and 387
"pykeops>=2.0.0, <2.2.0",
"torch>=1.7.0, <1.14.0"
"torch>=1.7.0, <3.0.0"
],
}

Expand Down