forked from OmicsML/dance
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tox.ini
70 lines (60 loc) · 2.94 KB
/
tox.ini
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
[tox]
minversion = 3.8.0
envlist = py3{9,10,11,12}-{cpu,osx,gpu}-{notest,test,lightbenchtest}
isolated_build = true
[gh-actions]
python =
3.9: py39
3.10: py310
3.11: py311
3.12: py312
[gh-actions:env]
RUN_SETTINGS =
cpu-test: cpu-test
osx-test: osx-test
gpu-test: gpu-test
cpu-lightbenchtest: cpu-lightbenchtest
osx-lightbenchtest: osx-lightbenchtest
gpu-lightbenchtest: gpu-lightbenchtest
cpu-notest: cpu-notest
osx-notest: osx-notest
gpu-notest: gpu-notest
[testenv]
setenv =
PYTHONPATH = {toxinidir}
extras =
dev
commands =
pip install -U pip
# Install torch related dependencies with CUDA 11.8
gpu: pip install torch==2.0.1 torchvision==0.15.2 --index-url https://download.pytorch.org/whl/cu118
cpu: pip install torch==2.0.1 torchvision==0.15.2 --index-url https://download.pytorch.org/whl/cpu
osx: pip install torch==2.0.1 torchvision==0.15.2
# Custom installation for PyG, cf. https://github.com/rusty1s/pytorch_scatter/pull/268
pip install torch_geometric==2.3.1
# gpu: pip install pyg-lib==0.2.0 -f https://data.pyg.org/whl/torch-2.0.0+cu118.html
# {cpu,osx}: pip install pyg-lib==0.2.0 -f https://data.pyg.org/whl/torch-2.0.0+cpu.html
# Custom installation for DGL
gpu: pip install dgl==1.1.2 -f https://data.dgl.ai/wheels/cu118/repo.html
{cpu,osx}: pip install dgl==1.1.2 -f https://data.dgl.ai/wheels/repo.html
### PyTorch 1.12.1, PyG 2.1.0, DGL 1.0, CUDA 10.2
# gpu: pip install torch==1.12.1+cu102 torchvision==0.13.1+cu102 --extra-index-url https://download.pytorch.org/whl/cu102
# cpu: pip install torch==1.12.1+cpu torchvision==0.13.1+cpu --extra-index-url https://download.pytorch.org/whl/cpu
# osx: pip install torch==1.12.1 torchvision==0.13.1
# # Custom installation for PyG, cf. https://github.com/rusty1s/pytorch_scatter/pull/268
# gpu: pip install torch-scatter torch-sparse torch-cluster torch-geometric -f https://data.pyg.org/whl/torch-1.12.1+cu102.html
# {cpu,osx}: pip install torch-geometric==2.1.0 torch-scatter torch-sparse torch-cluster -f https://data.pyg.org/whl/torch-1.12.1+cpu.html
# # Custom installation for DGL
# gpu: pip install dgl-cu102 -f https://data.dgl.ai/wheels/repo.html
# {cpu,osx}: pip install dgl -f https://data.dgl.ai/wheels/repo.html
# Install the rest of the dependencies
pip install -r {toxinidir}/requirements.txt
# Check installation
python --version
python -c "import torch; print(f'Successfully installed pytorch {torch.__version__}\n{torch.__file__}')"
python -c "import torch_geometric, torch_geometric.nn; print(f'Successfully installed pyg {torch_geometric.__version__}')"
python -c "import dgl; print(f'Successfully installed dgl {dgl.__version__}')"
python -c "import dance; print(f'Successfully installed dance {dance.__version__}')"
# Run tests
test: pytest tests/ -k "not test_bench" -v
lightbenchtest: pytest tests/ -k test_bench -v