Skip to content
This repository has been archived by the owner on Mar 22, 2024. It is now read-only.

Fix install #51

Merged
merged 3 commits into from
Jun 24, 2021
Merged
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
15 changes: 9 additions & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,18 +30,21 @@ jobs:
- run: conda --version
- run: which python
- name: install conda dependenies
run: conda install scipy mpi4py h5py
- name: install torch
env:
TORCH: "1.8"
run: conda install scipy mpi4py h5py pytorch==${TORCH} torchvision cpuonly -c pytorch -c conda-forge
TORCH: "1.8.0"
TORCH_VISION: "0.9.0"
run: pip install torch==${TORCH}+cpu torchvision==${TORCH_VISION}+cpu -f https://download.pytorch.org/whl/torch_stable.html

- name: install torch geometric
env:
TORCH_GEO: "1.8.0"
run: |
pip install --no-index torch-scatter -f https://pytorch-geometric.com/whl/torch-${TORCH_GEO}+cpu.html
pip install --no-index torch-sparse -f https://pytorch-geometric.com/whl/torch-${TORCH_GEO}+cpu.html
pip install --no-index torch-cluster -f https://pytorch-geometric.com/whl/torch-${TORCH_GEO}+cpu.html
pip install --no-index torch-spline-conv -f https://pytorch-geometric.com/whl/torch-${TORCH_GEO}+cpu.html
pip install torch-scatter -f https://pytorch-geometric.com/whl/torch-${TORCH_GEO}+cpu.html
pip install torch-sparse -f https://pytorch-geometric.com/whl/torch-${TORCH_GEO}+cpu.html
pip install torch-cluster -f https://pytorch-geometric.com/whl/torch-${TORCH_GEO}+cpu.html
pip install torch-spline-conv -f https://pytorch-geometric.com/whl/torch-${TORCH_GEO}+cpu.html
pip install torch-geometric

- name: Install the package
Expand Down
4 changes: 2 additions & 2 deletions deeprank_gnn/DataSet.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ def __init__(self, root='./', database=None, transform=None, pre_transform=None,
# and get fname and mol name from the index
self.create_index_molecules()

def __len__(self):
def len(self):
"""Gets the length of the dataset
Returns:
int: number of complexes in the dataset
Expand Down Expand Up @@ -229,7 +229,7 @@ def check_edge_feature(self):
exit()

def load_one_graph(self, fname, mol):
"""Loads one graph
"""Loads one graph

Args:
fname (str): hdf5 file name
Expand Down
2 changes: 1 addition & 1 deletion tests/test_nn.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
class TestNeuralNet(unittest.TestCase):

def setUp(self):
self.database = 'tests//hdf5/1ATN_residue.hdf5'
self.database = 'tests/hdf5/1ATN_residue.hdf5'

def test_neural_net(self):
NN = NeuralNet(self.database, GINet,
Expand Down