Skip to content

Commit ab14278

Browse files
authored
Merge pull request #21 from cics-nd/issue-20
Issue 20
2 parents a80296c + c82d2e0 commit ab14278

File tree

4 files changed

+21
-14
lines changed

4 files changed

+21
-14
lines changed

environment.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ name: gptorch
66
channels:
77
- pytorch
88
dependencies:
9-
- pytorch
10-
- numpy>=1.10
11-
- scipy>=0.18
12-
- matplotlib>=2.1.2
13-
- scikit-learn>=0.19.1
14-
- pytest>=3.5.0
159
- graphviz>=0.9
1610
- jupyter
11+
- matplotlib>=2.1.2
12+
- numpy>=1.10
13+
- pytest>=3.5.0
14+
- pytorch
15+
- scikit-learn>=0.19.1
16+
- scipy>=0.18

gptorch/functions.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010
from torch.nn import functional as F
1111
import numpy as np
1212

13-
torch_version = [int(s) for s in torch.__version__.split(".")]
14-
_potri = torch.cholesky_inverse if torch_version >= [1, 1, 0] else torch.potri
13+
_torch_majorminor = [int(s) for s in torch.__version__.split(".")[:2]]
14+
_potri = torch.cholesky_inverse if _torch_majorminor >= [1, 1] else torch.potri
1515

1616

1717
TRIANGULAR_SOLVE = "triangular_solve" in dir(torch)

requirements.txt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22
# Created: Saturday, July 13th 2019, 6:32:27 pm
33
# Author: Steven Atkinson (steven@atkinson.mn)
44

5-
torch>=1
6-
numpy>=1.10
7-
scipy>=0.18
5+
graphviz>=0.9
6+
jupyter
87
matplotlib>=2.1.2
9-
scikit-learn>=0.19.1
8+
numpy>=1.10
109
pytest>=3.5.0
1110
pytest-cov
12-
graphviz>=0.9
13-
jupyter
11+
scikit-learn>=0.19.1
12+
scipy>=0.18
13+
torch>=1

test/test_functions.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# File: test_functions.py
2+
# File Created: Saturday, 30th October 2021 11:06:35 am
3+
# Author: Steven Atkinson (steven@atkinson.mn)
4+
5+
def test_importable():
6+
from gptorch import functions
7+

0 commit comments

Comments
 (0)