Skip to content
Permalink
Browse files

py 2.7 fix

  • Loading branch information...
rusty1s committed May 13, 2019
1 parent c6c1692 commit 348c044af7a8303329fdeb845cbfad95ab8041f9
Showing with 5 additions and 12 deletions.
  1. +1 −1 .travis.yml
  2. +3 −10 torch_geometric/datasets/bitcoin_otc.py
  3. +1 −1 torch_geometric/read/ply.py
@@ -24,7 +24,7 @@ install:
- pip install flake8
- pip install torch-scatter torch-sparse torch-cluster torch-spline-conv
- pip install codecov
- if [[ $TRAVIS_PYTHON_VERSION == 2.7 ]]; then pip install scikit-learn==0.20; fi
- if [[ $TRAVIS_PYTHON_VERSION == 2.7 ]]; then pip install scikit-learn==0.20 networkx==2.2; fi
script:
- pycodestyle .
- flake8 .
@@ -89,18 +89,11 @@ def process(self):
data.num_nodes = num_nodes
data_list.append(data)

if self.pre_filter is not None:
data_list = [self.get(idx) for idx in range(len(self))]
data_list = [d for d in data_list if self.pre_filter(d)]
self.data, self.slices = self.collate(data_list)

if self.pre_transform is not None:
data_list = [self.get(idx) for idx in range(len(self))]
data_list = [self.pre_transform(d) for d in data_list]
self.data, self.slices = self.collate(data_list)
if self.pre_filter is not None:
data_list = [d for d in data_list if self.pre_filter(d)]

if self.pre_transform is not None:
data_list = [self.pre_transform(data) for data in data_list]
data_list = [self.pre_transform(d) for d in data_list]

data, slices = self.collate(data_list)
torch.save((data, slices), self.processed_paths[0])
@@ -13,7 +13,7 @@ def read_ply(path):
face = None
if 'face' in data:
faces = data['face']['vertex_indices']
faces = [torch.tensor(f, dtype=torch.long) for f in faces]
faces = [torch.tensor(fa, dtype=torch.long) for fa in faces]
face = torch.stack(faces, dim=-1)

data = Data(pos=pos)

0 comments on commit 348c044

Please sign in to comment.
You can’t perform that action at this time.