pyg-team / pytorch_geometric

Graph Neural Network Library for PyTorch
https://pyg.org
MIT License
21.29k stars 3.65k forks source link

FAILED test/nn/conv/test_cluster_gcn_conv.py::test_cluster_gcn_conv - assert False #2221

Closed GabbySuwichaya closed 3 years ago

GabbySuwichaya commented 3 years ago

🐛 Bug

To Reproduce

Steps to reproduce the behavior:

  1. Cloned and install Pytorch 1.8 with

    conda install pytorch torchvision torchaudio cudatoolkit=11.1 -c pytorch -c conda-forge
  2. Install PyG for Pytorch 1.8 and cuda 11.1

    CUDA="cu111"
    $ pip install torch-scatter -f https://pytorch-geometric.com/whl/torch-1.8.0+${CUDA}.html
    $ pip install torch-sparse -f https://pytorch-geometric.com/whl/torch-1.8.0+${CUDA}.html
    $ pip install torch-cluster -f https://pytorch-geometric.com/whl/torch-1.8.0+${CUDA}.html
    $ pip install torch-spline-conv -f https://pytorch-geometric.com/whl/torch-1.8.0+${CUDA}.html
    $ pip install git+https://github.com/rusty1s/pytorch_geometric.git
  3. Install extra-packages (These packages are not found when I run the test)

pip install trimesh
pip install gdist
conda install scikit-image
  1. run python3 setup.py test

Expected behavior

Get a failed test:

FAILED test/nn/conv/test_cluster_gcn_conv.py::test_cluster_gcn_conv - assert False

It seems that the error came from assert torch.allclose(conv(x, adj.t()), out) (Line 17. in test_cluster_gcn_conv.py )

conv(x, adj.t())-out
tensor([[ 0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,
          0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,
          0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,
          0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,
          0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,
          0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,
          0.0000e+00,  0.0000e+00],
        [ 1.1921e-07,  1.1921e-07,  2.3842e-07, -5.9605e-08,  0.0000e+00,
          5.9605e-08,  1.1921e-07,  0.0000e+00,  0.0000e+00, -1.1921e-07,
          2.3842e-07, -2.9802e-08, -2.9802e-08,  0.0000e+00,  1.1921e-07,
          0.0000e+00,  0.0000e+00,  2.3842e-07,  0.0000e+00,  0.0000e+00,
          5.9605e-08, -5.9605e-08,  0.0000e+00,  0.0000e+00,  0.0000e+00,
          0.0000e+00,  0.0000e+00, -2.3842e-07,  0.0000e+00,  0.0000e+00,
          0.0000e+00,  0.0000e+00],
        [ 0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,
          0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,
          0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,
          0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,
          0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,
          0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,
          0.0000e+00,  0.0000e+00],
        [ 0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,
          0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,
          0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,
          0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,
          0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,
          0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,
          0.0000e+00,  0.0000e+00]], grad_fn=<SubBackward0>)

The full output

(pygeo) gabby-suwichaya@gabby-suwichaya:/mnt/HDD4TB3/pytorch_geometric_master$ python3 setup.py test
running pytest
Searching for mock
Best match: mock 4.0.3
Processing mock-4.0.3-py3.6.egg

Using /mnt/HDD4TB3/pytorch_geometric_master/.eggs/mock-4.0.3-py3.6.egg
Searching for pytest-cov
Best match: pytest-cov 2.11.1
Processing pytest_cov-2.11.1-py3.6.egg

Using /mnt/HDD4TB3/pytorch_geometric_master/.eggs/pytest_cov-2.11.1-py3.6.egg
Searching for pytest
Best match: pytest 6.2.2
Processing pytest-6.2.2-py3.6.egg

Using /mnt/HDD4TB3/pytorch_geometric_master/.eggs/pytest-6.2.2-py3.6.egg
Searching for coverage>=5.2.1
Best match: coverage 5.5
Processing coverage-5.5-py3.6-linux-x86_64.egg

Using /mnt/HDD4TB3/pytorch_geometric_master/.eggs/coverage-5.5-py3.6-linux-x86_64.egg
Searching for toml
Best match: toml 0.10.2
Processing toml-0.10.2-py3.6.egg

Using /mnt/HDD4TB3/pytorch_geometric_master/.eggs/toml-0.10.2-py3.6.egg
Searching for py>=1.8.2
Best match: py 1.10.0
Processing py-1.10.0-py3.6.egg

Using /mnt/HDD4TB3/pytorch_geometric_master/.eggs/py-1.10.0-py3.6.egg
Searching for pluggy<1.0.0a1,>=0.12
Best match: pluggy 1.0.0.dev0
Processing pluggy-1.0.0.dev0-py3.6.egg

Using /mnt/HDD4TB3/pytorch_geometric_master/.eggs/pluggy-1.0.0.dev0-py3.6.egg
Searching for packaging
Best match: packaging 20.9
Processing packaging-20.9-py3.6.egg

Using /mnt/HDD4TB3/pytorch_geometric_master/.eggs/packaging-20.9-py3.6.egg
Searching for iniconfig
Best match: iniconfig 1.1.1
Processing iniconfig-1.1.1-py3.6.egg

Using /mnt/HDD4TB3/pytorch_geometric_master/.eggs/iniconfig-1.1.1-py3.6.egg
Searching for importlib-metadata>=0.12
Best match: importlib-metadata 3.7.2
Processing importlib_metadata-3.7.2-py3.6.egg

Using /mnt/HDD4TB3/pytorch_geometric_master/.eggs/importlib_metadata-3.7.2-py3.6.egg
Searching for attrs>=19.2.0
Best match: attrs 20.3.0
Processing attrs-20.3.0-py3.6.egg

Using /mnt/HDD4TB3/pytorch_geometric_master/.eggs/attrs-20.3.0-py3.6.egg
Searching for zipp>=0.5
Best match: zipp 3.4.1
Processing zipp-3.4.1-py3.6.egg

Using /mnt/HDD4TB3/pytorch_geometric_master/.eggs/zipp-3.4.1-py3.6.egg
running egg_info
writing torch_geometric.egg-info/PKG-INFO
writing dependency_links to torch_geometric.egg-info/dependency_links.txt
writing requirements to torch_geometric.egg-info/requires.txt
writing top-level names to torch_geometric.egg-info/top_level.txt
reading manifest file 'torch_geometric.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no previously-included files matching '*' found under directory 'examples'
warning: no previously-included files matching '*' found under directory 'docs'
warning: no previously-included files matching '*' found under directory 'benchmark'
writing manifest file 'torch_geometric.egg-info/SOURCES.txt'
running build_ext
================================================================================== test session starts ===================================================================================
platform linux -- Python 3.6.13, pytest-6.2.2, py-1.10.0, pluggy-1.0.0.dev0
rootdir: /mnt/HDD4TB3/pytorch_geometric_master, configfile: setup.cfg
plugins: cov-2.11.1
collected 245 items                                                                                                                                                                      

test/test_debug.py .
test/data/test_batch.py ..
test/data/test_cluster.py .
test/data/test_data.py ..
test/data/test_dataloader.py .
test/data/test_dataset.py ..
test/data/test_graph_saint.py .
test/data/test_inherit.py .
test/data/test_sampler.py .Downloading https://github.com/kimiyoung/planetoid/raw/master/data/ind.cora.x
Downloading https://github.com/kimiyoung/planetoid/raw/master/data/ind.cora.tx
Downloading https://github.com/kimiyoung/planetoid/raw/master/data/ind.cora.allx
Downloading https://github.com/kimiyoung/planetoid/raw/master/data/ind.cora.y
Downloading https://github.com/kimiyoung/planetoid/raw/master/data/ind.cora.ty
Downloading https://github.com/kimiyoung/planetoid/raw/master/data/ind.cora.ally
Downloading https://github.com/kimiyoung/planetoid/raw/master/data/ind.cora.graph
Downloading https://github.com/kimiyoung/planetoid/raw/master/data/ind.cora.test.index
Processing...
Done!
.
test/datasets/test_bzr.py Downloading https://www.chrsmrrs.com/graphkerneldatasets/BZR.zip
Extracting /tmp/5356564248707193943/BZR/BZR.zip
Processing...
Done!
.
test/datasets/test_enzymes.py Downloading https://www.chrsmrrs.com/graphkerneldatasets/ENZYMES.zip
Extracting /tmp/4026334420762809405/ENZYMES/ENZYMES.zip
Processing...
Done!
.Downloading https://raw.githubusercontent.com/nd7141/graph_datasets/master/datasets/ENZYMES.zip
Extracting /tmp/109009139200446863/ENZYMES/ENZYMES.zip
Processing...
Done!
.
test/datasets/test_karate.py .
test/datasets/test_mutag.py Downloading https://www.chrsmrrs.com/graphkerneldatasets/MUTAG.zip
Extracting /tmp/5320603759140312158/MUTAG/MUTAG.zip
Processing...
Done!
.
test/datasets/test_planetoid.py Downloading https://github.com/kimiyoung/planetoid/raw/master/data/ind.citeseer.x
Downloading https://github.com/kimiyoung/planetoid/raw/master/data/ind.citeseer.tx
Downloading https://github.com/kimiyoung/planetoid/raw/master/data/ind.citeseer.allx
Downloading https://github.com/kimiyoung/planetoid/raw/master/data/ind.citeseer.y
Downloading https://github.com/kimiyoung/planetoid/raw/master/data/ind.citeseer.ty
Downloading https://github.com/kimiyoung/planetoid/raw/master/data/ind.citeseer.ally
Downloading https://github.com/kimiyoung/planetoid/raw/master/data/ind.citeseer.graph
Downloading https://github.com/kimiyoung/planetoid/raw/master/data/ind.citeseer.test.index
Processing...
Done!
.
test/datasets/test_snap_dataset.py Downloading https://snap.stanford.edu/data/facebook.tar.gz
/tmp/381558111243627964/ego-facebook/raw/facebook.tar.gz
Extracting /tmp/381558111243627964/ego-facebook/raw/facebook.tar.gz
Processing...
Done!
Downloading https://snap.stanford.edu/data/soc-Slashdot0811.txt.gz
/tmp/381558111243627964/soc-slashdot0811/raw/soc-Slashdot0811.txt.gz
Extracting /tmp/381558111243627964/soc-slashdot0811/raw/soc-Slashdot0811.txt.gz
Processing...
Done!
Downloading https://snap.stanford.edu/data/wiki-Vote.txt.gz
/tmp/381558111243627964/wiki-vote/raw/wiki-Vote.txt.gz
Extracting /tmp/381558111243627964/wiki-vote/raw/wiki-Vote.txt.gz
Processing...
Done!
.
test/datasets/test_suite_sparse.py Downloading https://sparse.tamu.edu/mat/DIMACS10/citationCiteseer.mat
Processing...
Done!
Downloading https://sparse.tamu.edu/mat/HB/illc1850.mat
Processing...
Done!
.
test/io/test_off.py ..
test/nn/test_data_parallel.py .
test/nn/test_inits.py ..
test/nn/test_meta.py ..
test/nn/test_reshape.py .
test/nn/conv/test_agnn_conv.py ..
test/nn/conv/test_appnp.py .
test/nn/conv/test_arma_conv.py .
test/nn/conv/test_cg_conv.py ..
test/nn/conv/test_cheb_conv.py .
test/nn/conv/test_cluster_gcn_conv.py F
test/nn/conv/test_create_gnn.py .
test/nn/conv/test_dna_conv.py .
test/nn/conv/test_edge_conv.py ..
test/nn/conv/test_feast_conv.py .
test/nn/conv/test_film_conv.py .
test/nn/conv/test_gat_conv.py .
test/nn/conv/test_gated_graph_conv.py .
test/nn/conv/test_gcn2_conv.py .
test/nn/conv/test_gcn_conv.py ...
test/nn/conv/test_gen_conv.py ...
test/nn/conv/test_gin_conv.py ..
test/nn/conv/test_gmm_conv.py ..
test/nn/conv/test_graph_conv.py .
test/nn/conv/test_gravnet_conv.py .
test/nn/conv/test_hypergraph_conv.py .
test/nn/conv/test_le_conv.py .
test/nn/conv/test_message_passing.py ....
test/nn/conv/test_mf_conv.py .
test/nn/conv/test_nn_conv.py .
test/nn/conv/test_pna_conv.py .
test/nn/conv/test_point_conv.py .
test/nn/conv/test_ppf_conv.py .
test/nn/conv/test_res_gated_graph_conv.py .
test/nn/conv/test_rgcn_conv.py .........
test/nn/conv/test_sage_conv.py .
test/nn/conv/test_sg_conv.py .
test/nn/conv/test_signed_conv.py .
test/nn/conv/test_spline_conv.py .
test/nn/conv/test_static_graph.py .
test/nn/conv/test_supergat_conv.py ..
test/nn/conv/test_tag_conv.py ..
test/nn/conv/test_transformer_conv.py .
test/nn/conv/test_x_conv.py .
test/nn/dense/test_dense_gcn_conv.py ..
test/nn/dense/test_dense_gin_conv.py ..
test/nn/dense/test_dense_graph_conv.py ......
test/nn/dense/test_dense_sage_conv.py ..
test/nn/dense/test_diff_pool.py .
test/nn/dense/test_mincut_pool.py .
test/nn/glob/test_attention.py .
test/nn/glob/test_glob.py ..
test/nn/glob/test_set2set.py .
test/nn/glob/test_sort.py ..
test/nn/models/test_autoencoder.py .....
test/nn/models/test_deep_graph_infomax.py .
test/nn/models/test_gnn_explainer.py ....
test/nn/models/test_graph_unet.py .
test/nn/models/test_jumping_knowledge.py .
test/nn/models/test_metapath2vec.py .
test/nn/models/test_node2vec.py .
test/nn/models/test_re_net.py Processing...
Done!
.
test/nn/models/test_signed_gcn.py .
test/nn/norm/test_batch_norm.py ..
test/nn/norm/test_diff_group_norm.py ..
test/nn/norm/test_graph_size_norm.py .
test/nn/norm/test_instance_norm.py ..
test/nn/norm/test_layer_norm.py ..
test/nn/norm/test_msg_norm.py .
test/nn/norm/test_pair_norm.py ..
test/nn/pool/test_asap.py .
test/nn/pool/test_avg_pool.py ...
test/nn/pool/test_consecutive.py .
test/nn/pool/test_edge_pool.py ....
test/nn/pool/test_graclus.py .
test/nn/pool/test_max_pool.py ...
test/nn/pool/test_sag_pool.py .
test/nn/pool/test_topk_pool.py ...
test/nn/pool/test_voxel_grid.py ..
test/nn/unpool/test_knn_interpolate.py .
test/transforms/test_add_self_loops.py .
test/transforms/test_add_train_val_test_mask.py ..
test/transforms/test_cartesian.py .
test/transforms/test_center.py .
test/transforms/test_compose.py .
test/transforms/test_constant.py .
test/transforms/test_delaunay.py .
test/transforms/test_distance.py .
test/transforms/test_face_to_edge.py .
test/transforms/test_fixed_points.py .
test/transforms/test_gdc.py .
test/transforms/test_generate_normals.py .
test/transforms/test_grid_sampling.py .
test/transforms/test_knn_graph.py .
test/transforms/test_laplacian_lambda_max.py .
test/transforms/test_line_graph.py .
test/transforms/test_linear_transformation.py .
test/transforms/test_local_cartesian.py .
test/transforms/test_local_degree_profile.py .
test/transforms/test_normalize_features.py .
test/transforms/test_normalize_rotation.py .
test/transforms/test_normalize_scale.py .
test/transforms/test_one_hot_degree.py .
test/transforms/test_point_pair_features.py .
test/transforms/test_polar.py .
test/transforms/test_radius_graph.py .
test/transforms/test_random_flip.py .
test/transforms/test_random_rotate.py .
test/transforms/test_random_scale.py .
test/transforms/test_random_shear.py .
test/transforms/test_random_translate.py .
test/transforms/test_remove_isolated_nodes.py .
test/transforms/test_sample_points.py .
test/transforms/test_spherical.py .
test/transforms/test_target_indegree.py .
test/transforms/test_to_dense.py .
test/transforms/test_to_superpixels.py Extracting /tmp/2973251899067965986/MNIST/raw/t10k-images-idx3-ubyte.gz
Extracting /tmp/2973251899067965986/MNIST/raw/t10k-labels-idx1-ubyte.gz
.
test/transforms/test_two_hop.py .
test/utils/test_convert.py ............
test/utils/test_degree.py .
test/utils/test_dropout.py .
test/utils/test_geodesic.py .
test/utils/test_get_laplacian.py .
test/utils/test_grid.py .
test/utils/test_isolated.py ..
test/utils/test_loop.py ......
test/utils/test_metric.py ..
test/utils/test_negative_sampling.py ...
test/utils/test_normalized_cut.py .
test/utils/test_random.py ...
test/utils/test_repeat.py .
test/utils/test_softmax.py ..
test/utils/test_sort_edge_index.py .
test/utils/test_sparse.py .
test/utils/test_subgraph.py ..
test/utils/test_to_dense_adj.py ..
test/utils/test_to_dense_batch.py .
test/utils/test_train_test_split_edges.py .
test/utils/test_undirected.py ..
test/visualization/test_influence.py .

======================================================================================== FAILURES ========================================================================================
_________________________________________________________________________________ test_cluster_gcn_conv __________________________________________________________________________________

    def test_cluster_gcn_conv():
        x = torch.randn(4, 16)
        edge_index = torch.tensor([[0, 1, 2, 3], [0, 0, 1, 1]])
        row, col = edge_index
        adj = SparseTensor(row=row, col=col, sparse_sizes=(4, 4))

        conv = ClusterGCNConv(16, 32, diag_lambda=1.)
        assert conv.__repr__() == 'ClusterGCNConv(16, 32, diag_lambda=1.0)'
        out = conv(x, edge_index)
        assert out.size() == (4, 32)
        assert conv(x, edge_index, size=(4, 4)).tolist() == out.tolist()
>       assert torch.allclose(conv(x, adj.t()), out)
E       assert False
E        +  where False = <built-in method allclose of type object at 0x7f9c3627fc60>(tensor([[ 1.5143e+00, -2.7621e+00,  2.4785e-01,  2.2451e+00,  8.3697e-01,\n         -9.1483e-01,  1.6928e-02,  3.4155e+...7e+00,  1.2849e+00, -2.7049e+00,  1.8515e+00, -1.6510e+00,\n          2.1814e+00,  1.1000e+00]], grad_fn=<AddBackward0>), tensor([[ 1.5143e+00, -2.7621e+00,  2.4785e-01,  2.2451e+00,  8.3697e-01,\n         -9.1483e-01,  1.6928e-02,  3.4155e+...7e+00,  1.2849e+00, -2.7049e+00,  1.8515e+00, -1.6510e+00,\n          2.1814e+00,  1.1000e+00]], grad_fn=<AddBackward0>))
E        +    where <built-in method allclose of type object at 0x7f9c3627fc60> = torch.allclose
E        +    and   tensor([[ 1.5143e+00, -2.7621e+00,  2.4785e-01,  2.2451e+00,  8.3697e-01,\n         -9.1483e-01,  1.6928e-02,  3.4155e+...7e+00,  1.2849e+00, -2.7049e+00,  1.8515e+00, -1.6510e+00,\n          2.1814e+00,  1.1000e+00]], grad_fn=<AddBackward0>) = ClusterGCNConv(16, 32, diag_lambda=1.0)(tensor([[ 0.6069,  0.0554, -0.8597,  0.9485,  1.6096, -1.9905, -0.4365, -1.3972,\n          1.8610,  0.8206,  1.0339, -... -0.2508, -1.3334,  0.6628,  0.8708,\n         -0.2222, -2.1454,  0.7816, -0.2902,  1.0165, -0.5280, -0.3406,  3.1808]]), SparseTensor(row=tensor([0, 0, 1, 1]),\n             col=tensor([0, 1, 2, 3]),\n             size=(4, 4), nnz=4, density=25.00%))
E        +      where SparseTensor(row=tensor([0, 0, 1, 1]),\n             col=tensor([0, 1, 2, 3]),\n             size=(4, 4), nnz=4, density=25.00%) = <bound method <lambda> of SparseTensor(row=tensor([0, 1, 2, 3]),\n             col=tensor([0, 0, 1, 1]),\n             size=(4, 4), nnz=4, density=25.00%)>()
E        +        where <bound method <lambda> of SparseTensor(row=tensor([0, 1, 2, 3]),\n             col=tensor([0, 0, 1, 1]),\n             size=(4, 4), nnz=4, density=25.00%)> = SparseTensor(row=tensor([0, 1, 2, 3]),\n             col=tensor([0, 0, 1, 1]),\n             size=(4, 4), nnz=4, density=25.00%).t

test/nn/conv/test_cluster_gcn_conv.py:17: AssertionError
==================================================================================== warnings summary ====================================================================================
test/data/test_dataset.py:5
  /mnt/HDD4TB3/pytorch_geometric_master/test/data/test_dataset.py:5: PytestCollectionWarning: cannot collect test class 'TestDataset' because it has a __init__ constructor (from: test/data/test_dataset.py)
    class TestDataset(InMemoryDataset):

test/nn/test_data_parallel.py::test_data_parallel
  /home/gabby-suwichaya/anaconda3/envs/pygeo/lib/python3.6/site-packages/torch/nn/parallel/data_parallel.py:30: UserWarning: 
      There is an imbalance between your GPUs. You may want to exclude GPU 0 which
      has less than 75% of the memory or cores of GPU 1. You can do so by setting
      the device_ids argument to DataParallel, or by setting the CUDA_VISIBLE_DEVICES
      environment variable.
    warnings.warn(imbalance_warn.format(device_ids[min_pos], device_ids[max_pos]))

test/nn/conv/test_spline_conv.py::test_spline_conv
  /mnt/HDD4TB3/pytorch_geometric_master/torch_geometric/nn/conv/spline_conv.py:118: UserWarning: We do not recommend using the non-optimized CPU version of `SplineConv`. If possible, please move your data to GPU.
    'We do not recommend using the non-optimized CPU version of '

test/nn/conv/test_spline_conv.py::test_spline_conv
test/nn/conv/test_spline_conv.py::test_spline_conv
  /tmp/gabby-suwichaya_pyg_jit/tmp8nqmgnbi.py:180: UserWarning: We do not recommend using the non-optimized CPU version of `SplineConv`. If possible, please move your data to GPU.
    warnings.warn(

test/nn/conv/test_spline_conv.py::test_spline_conv
  /tmp/gabby-suwichaya_pyg_jit/tmpd_ef65j_.py:180: UserWarning: We do not recommend using the non-optimized CPU version of `SplineConv`. If possible, please move your data to GPU.
    warnings.warn(

test/nn/conv/test_spline_conv.py::test_spline_conv
test/nn/conv/test_spline_conv.py::test_spline_conv
test/nn/conv/test_spline_conv.py::test_spline_conv
  /tmp/gabby-suwichaya_pyg_jit/tmp56e8a4ao.py:180: UserWarning: We do not recommend using the non-optimized CPU version of `SplineConv`. If possible, please move your data to GPU.
    warnings.warn(

test/nn/conv/test_spline_conv.py::test_spline_conv
test/nn/conv/test_spline_conv.py::test_spline_conv
  /tmp/gabby-suwichaya_pyg_jit/tmp1lt94jf2.py:180: UserWarning: We do not recommend using the non-optimized CPU version of `SplineConv`. If possible, please move your data to GPU.
    warnings.warn(

test/transforms/test_to_superpixels.py::test_to_superpixels
  /home/gabby-suwichaya/anaconda3/envs/pygeo/lib/python3.6/site-packages/torchvision/datasets/mnist.py:479: UserWarning: The given NumPy array is not writeable, and PyTorch does not support non-writeable tensors. This means you can write to the underlying (supposedly non-writeable) NumPy array using the tensor. You may want to copy the array to protect its data or make it writeable before converting it to a tensor. This type of warning will be suppressed for the rest of this program. (Triggered internally at  /opt/conda/conda-bld/pytorch_1614378063927/work/torch/csrc/utils/tensor_numpy.cpp:143.)
    return torch.from_numpy(parsed.astype(m[2], copy=False)).view(*s)

test/transforms/test_to_superpixels.py::test_to_superpixels
  /home/gabby-suwichaya/anaconda3/envs/pygeo/lib/python3.6/importlib/_bootstrap.py:219: RuntimeWarning: numpy.ufunc size changed, may indicate binary incompatibility. Expected 192 from C header, got 216 from PyObject
    return f(*args, **kwds)

test/transforms/test_to_superpixels.py::test_to_superpixels
test/transforms/test_to_superpixels.py::test_to_superpixels
test/transforms/test_to_superpixels.py::test_to_superpixels
test/transforms/test_to_superpixels.py::test_to_superpixels
test/transforms/test_to_superpixels.py::test_to_superpixels
test/transforms/test_to_superpixels.py::test_to_superpixels
  /home/gabby-suwichaya/anaconda3/envs/pygeo/lib/python3.6/site-packages/skimage/util/dtype.py:226: DeprecationWarning: Converting `np.inexact` or `np.floating` to a dtype is deprecated. The current result is `float64` which is not strictly correct.
    dtypeobj_out = np.dtype(dtype)

test/utils/test_convert.py::test_to_networkx
test/utils/test_convert.py::test_to_networkx
test/utils/test_convert.py::test_to_networkx_undirected
test/utils/test_convert.py::test_to_networkx_undirected
  /home/gabby-suwichaya/anaconda3/envs/pygeo/lib/python3.6/site-packages/numpy/matrixlib/defmatrix.py:69: PendingDeprecationWarning: the matrix subclass is not the recommended way to represent matrices or deal with linear algebra (see https://docs.scipy.org/doc/numpy/user/numpy-for-matlab-users.html). Please adjust your code to use regular ndarray.
    return matrix(data, dtype=dtype, copy=False)

-- Docs: https://docs.pytest.org/en/stable/warnings.html

---------- coverage: platform linux, python 3.6.13-final-0 -----------
Name                                                    Stmts   Miss  Cover
---------------------------------------------------------------------------
torch_geometric/__init__.py                                26      8    69%
torch_geometric/data/__init__.py                           12      0   100%
torch_geometric/data/batch.py                             176     30    83%
torch_geometric/data/cluster.py                            82      4    95%
torch_geometric/data/data.py                              191     13    93%
torch_geometric/data/dataloader.py                         49      6    88%
torch_geometric/data/dataset.py                           102      3    97%
torch_geometric/data/download.py                           16      0   100%
torch_geometric/data/graph_saint.py                        96      1    99%
torch_geometric/data/in_memory_dataset.py                  91     12    87%
torch_geometric/data/makedirs.py                            6      0   100%
torch_geometric/data/sampler.py                           119     49    59%
torch_geometric/data/temporal.py                           77     55    29%
torch_geometric/debug.py                                   22      0   100%
torch_geometric/io/__init__.py                              9      0   100%
torch_geometric/io/npz.py                                  18     11    39%
torch_geometric/io/obj.py                                  27     23    15%
torch_geometric/io/off.py                                  49      1    98%
torch_geometric/io/planetoid.py                            63      1    98%
torch_geometric/io/ply.py                                  11      6    45%
torch_geometric/io/sdf.py                                  25     17    32%
torch_geometric/io/tu.py                                   77      3    96%
torch_geometric/io/txt_array.py                             9      0   100%
torch_geometric/nn/__init__.py                             11      0   100%
torch_geometric/nn/acts.py                                  2      1    50%
torch_geometric/nn/conv/__init__.py                        40      0   100%
torch_geometric/nn/conv/agnn_conv.py                       37      0   100%
torch_geometric/nn/conv/appnp.py                           60     13    78%
torch_geometric/nn/conv/arma_conv.py                       59      0   100%
torch_geometric/nn/conv/cg_conv.py                         37      0   100%
torch_geometric/nn/conv/cheb_conv.py                       60      0   100%
torch_geometric/nn/conv/cluster_gcn_conv.py                55      0   100%
torch_geometric/nn/conv/dna_conv.py                       137      2    99%
torch_geometric/nn/conv/edge_conv.py                       49      0   100%
torch_geometric/nn/conv/feast_conv.py                      49      0   100%
torch_geometric/nn/conv/film_conv.py                       64      2    97%
torch_geometric/nn/conv/gat_conv.py                        96      0   100%
torch_geometric/nn/conv/gated_graph_conv.py                34      0   100%
torch_geometric/nn/conv/gcn2_conv.py                       67      5    93%
torch_geometric/nn/conv/gcn_conv.py                        93      2    98%
torch_geometric/nn/conv/gen_conv.py                        94     15    84%
torch_geometric/nn/conv/gin_conv.py                        66      1    98%
torch_geometric/nn/conv/gmm_conv.py                        65      0   100%
torch_geometric/nn/conv/graph_conv.py                      34      0   100%
torch_geometric/nn/conv/gravnet_conv.py                    53      0   100%
torch_geometric/nn/conv/hypergraph_conv.py                 73      1    99%
torch_geometric/nn/conv/le_conv.py                         26      0   100%
torch_geometric/nn/conv/message_passing.py                172      1    99%
torch_geometric/nn/conv/mf_conv.py                         55      0   100%
torch_geometric/nn/conv/nn_conv.py                         44      0   100%
torch_geometric/nn/conv/pna_conv.py                       109      7    94%
torch_geometric/nn/conv/point_conv.py                      43      0   100%
torch_geometric/nn/conv/ppf_conv.py                        50      0   100%
torch_geometric/nn/conv/res_gated_graph_conv.py            49      0   100%
torch_geometric/nn/conv/rgcn_conv.py                      135      2    99%
torch_geometric/nn/conv/sage_conv.py                       43      0   100%
torch_geometric/nn/conv/sg_conv.py                         42      0   100%
torch_geometric/nn/conv/signed_conv.py                     59      0   100%
torch_geometric/nn/conv/spline_conv.py                     53      0   100%
torch_geometric/nn/conv/supergat_conv.py                  101      4    96%
torch_geometric/nn/conv/tag_conv.py                        36      0   100%
torch_geometric/nn/conv/transformer_conv.py                78     11    86%
torch_geometric/nn/conv/utils/__init__.py                   0      0   100%
torch_geometric/nn/conv/utils/helpers.py                    5      1    80%
torch_geometric/nn/conv/utils/inspector.py                 63      0   100%
torch_geometric/nn/conv/utils/jit.py                       16      0   100%
torch_geometric/nn/conv/utils/typing.py                    80      2    98%
torch_geometric/nn/conv/wl_conv.py                         44     31    30%
torch_geometric/nn/conv/x_conv.py                          64      0   100%
torch_geometric/nn/dense/__init__.py                        9      0   100%
torch_geometric/nn/dense/dense_gcn_conv.py                 35      0   100%
torch_geometric/nn/dense/dense_gin_conv.py                 27      0   100%
torch_geometric/nn/dense/dense_graph_conv.py               36      0   100%
torch_geometric/nn/dense/dense_sage_conv.py                29      0   100%
torch_geometric/nn/dense/diff_pool.py                      18      0   100%
torch_geometric/nn/dense/mincut_pool.py                    35      0   100%
torch_geometric/nn/glob/__init__.py                         6      0   100%
torch_geometric/nn/glob/attention.py                       24      0   100%
torch_geometric/nn/glob/glob.py                            11      0   100%
torch_geometric/nn/glob/set2set.py                         28      0   100%
torch_geometric/nn/glob/sort.py                            19      0   100%
torch_geometric/nn/inits.py                                37      4    89%
torch_geometric/nn/meta.py                                 26      0   100%
torch_geometric/nn/models/__init__.py                      17      0   100%
torch_geometric/nn/models/autoencoder.py                   91      0   100%
torch_geometric/nn/models/correct_and_smooth.py            44     34    23%
torch_geometric/nn/models/deep_graph_infomax.py            37      0   100%
torch_geometric/nn/models/deepgcn.py                       44     36    18%
torch_geometric/nn/models/dimenet.py                      280    227    19%
torch_geometric/nn/models/dimenet_utils.py                 98     86    12%
torch_geometric/nn/models/gnn_explainer.py                132      7    95%
torch_geometric/nn/models/graph_unet.py                    78      0   100%
torch_geometric/nn/models/jumping_knowledge.py             32      0   100%
torch_geometric/nn/models/label_prop.py                    37     22    41%
torch_geometric/nn/models/metapath2vec.py                 107      2    98%
torch_geometric/nn/models/node2vec.py                      76      2    97%
torch_geometric/nn/models/re_net.py                        94      0   100%
torch_geometric/nn/models/schnet.py                       198    161    19%
torch_geometric/nn/models/signed_gcn.py                    93      0   100%
torch_geometric/nn/models/tgn.py                          164    128    22%
torch_geometric/nn/norm/__init__.py                         9      0   100%
torch_geometric/nn/norm/batch_norm.py                      12      1    92%
torch_geometric/nn/norm/diff_group_norm.py                 39      0   100%
torch_geometric/nn/norm/graph_size_norm.py                 11      1    91%
torch_geometric/nn/norm/instance_norm.py                   40      0   100%
torch_geometric/nn/norm/layer_norm.py                      36      0   100%
torch_geometric/nn/norm/msg_norm.py                        16      1    94%
torch_geometric/nn/norm/pair_norm.py                       23      0   100%
torch_geometric/nn/pool/__init__.py                        30      6    80%
torch_geometric/nn/pool/asap.py                            66      0   100%
torch_geometric/nn/pool/avg_pool.py                        33      0   100%
torch_geometric/nn/pool/consecutive.py                      6      0   100%
torch_geometric/nn/pool/edge_pool.py                       77      0   100%
torch_geometric/nn/pool/graclus.py                          7      0   100%
torch_geometric/nn/pool/max_pool.py                        33      0   100%
torch_geometric/nn/pool/pool.py                            16      0   100%
torch_geometric/nn/pool/sag_pool.py                        34      0   100%
torch_geometric/nn/pool/topk_pool.py                       73      0   100%
torch_geometric/nn/pool/voxel_grid.py                      22      0   100%
torch_geometric/nn/reshape.py                              10      0   100%
torch_geometric/nn/unpool/__init__.py                       3      0   100%
torch_geometric/nn/unpool/knn_interpolate.py               13      0   100%
torch_geometric/transforms/__init__.py                     44      0   100%
torch_geometric/transforms/add_self_loops.py               13      0   100%
torch_geometric/transforms/add_train_val_test_mask.py      52      0   100%
torch_geometric/transforms/cartesian.py                    20      0   100%
torch_geometric/transforms/center.py                        6      0   100%
torch_geometric/transforms/compose.py                      10      0   100%
torch_geometric/transforms/constant.py                     15      0   100%
torch_geometric/transforms/delaunay.py                     18      0   100%
torch_geometric/transforms/distance.py                     18      0   100%
torch_geometric/transforms/face_to_edge.py                 16      0   100%
torch_geometric/transforms/fixed_points.py                 25      0   100%
torch_geometric/transforms/gcn_norm.py                     14     10    29%
torch_geometric/transforms/gdc.py                         196     42    79%
torch_geometric/transforms/generate_mesh_normals.py        18      0   100%
torch_geometric/transforms/grid_sampling.py                30      1    97%
torch_geometric/transforms/knn_graph.py                    18      0   100%
torch_geometric/transforms/laplacian_lambda_max.py         21      0   100%
torch_geometric/transforms/line_graph.py                   44      0   100%
torch_geometric/transforms/linear_transformation.py        13      0   100%
torch_geometric/transforms/local_cartesian.py              22      1    95%
torch_geometric/transforms/local_degree_profile.py         23      0   100%
torch_geometric/transforms/normalize_features.py            6      0   100%
torch_geometric/transforms/normalize_rotation.py           23      0   100%
torch_geometric/transforms/normalize_scale.py              11      0   100%
torch_geometric/transforms/one_hot_degree.py               19      0   100%
torch_geometric/transforms/point_pair_features.py          21      0   100%
torch_geometric/transforms/polar.py                        25      0   100%
torch_geometric/transforms/radius_graph.py                 14      0   100%
torch_geometric/transforms/random_flip.py                  13      0   100%
torch_geometric/transforms/random_rotate.py                25      0   100%
torch_geometric/transforms/random_scale.py                 11      0   100%
torch_geometric/transforms/random_shear.py                 13      0   100%
torch_geometric/transforms/random_translate.py             18      0   100%
torch_geometric/transforms/remove_isolated_nodes.py        16      0   100%
torch_geometric/transforms/sample_points.py                33      0   100%
torch_geometric/transforms/sign.py                         21     15    29%
torch_geometric/transforms/spherical.py                    27      0   100%
torch_geometric/transforms/target_indegree.py              21      0   100%
torch_geometric/transforms/to_dense.py                     35      0   100%
torch_geometric/transforms/to_sparse_tensor.py             29     24    17%
torch_geometric/transforms/to_superpixels.py               27      0   100%
torch_geometric/transforms/to_undirected.py                10      6    40%
torch_geometric/transforms/two_hop.py                      22      0   100%
torch_geometric/typing.py                                  10      0   100%
torch_geometric/utils/__init__.py                          26      0   100%
torch_geometric/utils/convert.py                           70      2    97%
torch_geometric/utils/degree.py                             8      0   100%
torch_geometric/utils/dropout.py                           23      0   100%
torch_geometric/utils/geodesic.py                          36      3    92%
torch_geometric/utils/get_laplacian.py                     31      0   100%
torch_geometric/utils/grid.py                              28      0   100%
torch_geometric/utils/hetero.py                            28     28     0%
torch_geometric/utils/homophily.py                         12      6    50%
torch_geometric/utils/isolated.py                          28      0   100%
torch_geometric/utils/loop.py                              45      0   100%
torch_geometric/utils/metric.py                            58      0   100%
torch_geometric/utils/negative_sampling.py                 59      5    92%
torch_geometric/utils/normalized_cut.py                     8      0   100%
torch_geometric/utils/num_nodes.py                         30     15    50%
torch_geometric/utils/random.py                            55      0   100%
torch_geometric/utils/repeat.py                            12      0   100%
torch_geometric/utils/softmax.py                           22     15    32%
torch_geometric/utils/sort_edge_index.py                    6      0   100%
torch_geometric/utils/sparse.py                             5      0   100%
torch_geometric/utils/subgraph.py                          51      2    96%
torch_geometric/utils/to_dense_adj.py                      25      0   100%
torch_geometric/utils/to_dense_batch.py                    23      0   100%
torch_geometric/utils/train_test_split_edges.py            34      0   100%
torch_geometric/utils/tree_decomposition.py                81     73    10%
torch_geometric/utils/undirected.py                        20      0   100%
torch_geometric/visualization/__init__.py                   2      0   100%
torch_geometric/visualization/influence.py                 10      0   100%
---------------------------------------------------------------------------
TOTAL                                                    8548   1310    85%

================================================================================ short test summary info =================================================================================
FAILED test/nn/conv/test_cluster_gcn_conv.py::test_cluster_gcn_conv - assert False
================================================================= 1 failed, 244 passed, 23 warnings in 104.34s (0:01:44) =================================================================

Environment

Additional context

torch-cluster             1.5.9                    pypi_0    pypi
torch-geometric           1.6.3                    pypi_0    pypi
torch-scatter             2.0.6                    pypi_0    pypi
torch-sparse              0.6.9                    pypi_0    pypi
torch-spline-conv         1.2.1                    pypi_0    pypi
torchaudio                0.8.0                      py36    pytorch
torchvision               0.9.0                py36_cu111    pytorch
rusty1s commented 3 years ago

Seems to be an issue with numerical stability. Can you try if

assert torch.allclose(conv(x, adj.t()), out, atol=1e-5)

fixes this issue in test/nn/conv/test_cluster.gcn.py?

GabbySuwichaya commented 3 years ago

Yes, with the fix, the test went without failures.

The full output is as follows:

(pygeo) gabby-suwichaya@gabby-suwichaya:/mnt/HDD4TB3/pytorch_geometric_master$ python3 setup.py test
running pytest
Searching for mock
Best match: mock 4.0.3
Processing mock-4.0.3-py3.6.egg

Using /mnt/HDD4TB3/pytorch_geometric_master/.eggs/mock-4.0.3-py3.6.egg
Searching for pytest-cov
Best match: pytest-cov 2.11.1
Processing pytest_cov-2.11.1-py3.6.egg

Using /mnt/HDD4TB3/pytorch_geometric_master/.eggs/pytest_cov-2.11.1-py3.6.egg
Searching for pytest
Best match: pytest 6.2.2
Processing pytest-6.2.2-py3.6.egg

Using /mnt/HDD4TB3/pytorch_geometric_master/.eggs/pytest-6.2.2-py3.6.egg
Searching for coverage>=5.2.1
Best match: coverage 5.5
Processing coverage-5.5-py3.6-linux-x86_64.egg

Using /mnt/HDD4TB3/pytorch_geometric_master/.eggs/coverage-5.5-py3.6-linux-x86_64.egg
Searching for toml
Best match: toml 0.10.2
Processing toml-0.10.2-py3.6.egg

Using /mnt/HDD4TB3/pytorch_geometric_master/.eggs/toml-0.10.2-py3.6.egg
Searching for py>=1.8.2
Best match: py 1.10.0
Processing py-1.10.0-py3.6.egg

Using /mnt/HDD4TB3/pytorch_geometric_master/.eggs/py-1.10.0-py3.6.egg
Searching for pluggy<1.0.0a1,>=0.12
Best match: pluggy 1.0.0.dev0
Processing pluggy-1.0.0.dev0-py3.6.egg

Using /mnt/HDD4TB3/pytorch_geometric_master/.eggs/pluggy-1.0.0.dev0-py3.6.egg
Searching for packaging
Best match: packaging 20.9
Processing packaging-20.9-py3.6.egg

Using /mnt/HDD4TB3/pytorch_geometric_master/.eggs/packaging-20.9-py3.6.egg
Searching for iniconfig
Best match: iniconfig 1.1.1
Processing iniconfig-1.1.1-py3.6.egg

Using /mnt/HDD4TB3/pytorch_geometric_master/.eggs/iniconfig-1.1.1-py3.6.egg
Searching for importlib-metadata>=0.12
Best match: importlib-metadata 3.7.2
Processing importlib_metadata-3.7.2-py3.6.egg

Using /mnt/HDD4TB3/pytorch_geometric_master/.eggs/importlib_metadata-3.7.2-py3.6.egg
Searching for attrs>=19.2.0
Best match: attrs 20.3.0
Processing attrs-20.3.0-py3.6.egg

Using /mnt/HDD4TB3/pytorch_geometric_master/.eggs/attrs-20.3.0-py3.6.egg
Searching for zipp>=0.5
Best match: zipp 3.4.1
Processing zipp-3.4.1-py3.6.egg

Using /mnt/HDD4TB3/pytorch_geometric_master/.eggs/zipp-3.4.1-py3.6.egg
running egg_info
writing torch_geometric.egg-info/PKG-INFO
writing dependency_links to torch_geometric.egg-info/dependency_links.txt
writing requirements to torch_geometric.egg-info/requires.txt
writing top-level names to torch_geometric.egg-info/top_level.txt
reading manifest file 'torch_geometric.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no previously-included files matching '*' found under directory 'examples'
warning: no previously-included files matching '*' found under directory 'docs'
warning: no previously-included files matching '*' found under directory 'benchmark'
writing manifest file 'torch_geometric.egg-info/SOURCES.txt'
running build_ext
============================================================================= test session starts ==============================================================================
platform linux -- Python 3.6.13, pytest-6.2.2, py-1.10.0, pluggy-1.0.0.dev0
rootdir: /mnt/HDD4TB3/pytorch_geometric_master, configfile: setup.cfg
plugins: cov-2.11.1
collected 245 items                                                                                                                                                            

test/test_debug.py .
test/data/test_batch.py ..
test/data/test_cluster.py .
test/data/test_data.py ..
test/data/test_dataloader.py .
test/data/test_dataset.py ..
test/data/test_graph_saint.py .
test/data/test_inherit.py .
test/data/test_sampler.py .Downloading https://github.com/kimiyoung/planetoid/raw/master/data/ind.cora.x
Downloading https://github.com/kimiyoung/planetoid/raw/master/data/ind.cora.tx
Downloading https://github.com/kimiyoung/planetoid/raw/master/data/ind.cora.allx
Downloading https://github.com/kimiyoung/planetoid/raw/master/data/ind.cora.y
Downloading https://github.com/kimiyoung/planetoid/raw/master/data/ind.cora.ty
Downloading https://github.com/kimiyoung/planetoid/raw/master/data/ind.cora.ally
Downloading https://github.com/kimiyoung/planetoid/raw/master/data/ind.cora.graph
Downloading https://github.com/kimiyoung/planetoid/raw/master/data/ind.cora.test.index
Processing...
Done!
.
test/datasets/test_bzr.py Downloading https://www.chrsmrrs.com/graphkerneldatasets/BZR.zip
Extracting /tmp/7642886520638217184/BZR/BZR.zip
Processing...
Done!
.
test/datasets/test_enzymes.py Downloading https://www.chrsmrrs.com/graphkerneldatasets/ENZYMES.zip
Extracting /tmp/8447326831124905833/ENZYMES/ENZYMES.zip
Processing...
Done!
.Downloading https://raw.githubusercontent.com/nd7141/graph_datasets/master/datasets/ENZYMES.zip
Extracting /tmp/1155995635279536790/ENZYMES/ENZYMES.zip
Processing...
Done!
.
test/datasets/test_karate.py .
test/datasets/test_mutag.py Downloading https://www.chrsmrrs.com/graphkerneldatasets/MUTAG.zip
Extracting /tmp/553883569307240118/MUTAG/MUTAG.zip
Processing...
Done!
.
test/datasets/test_planetoid.py Downloading https://github.com/kimiyoung/planetoid/raw/master/data/ind.citeseer.x
Downloading https://github.com/kimiyoung/planetoid/raw/master/data/ind.citeseer.tx
Downloading https://github.com/kimiyoung/planetoid/raw/master/data/ind.citeseer.allx
Downloading https://github.com/kimiyoung/planetoid/raw/master/data/ind.citeseer.y
Downloading https://github.com/kimiyoung/planetoid/raw/master/data/ind.citeseer.ty
Downloading https://github.com/kimiyoung/planetoid/raw/master/data/ind.citeseer.ally
Downloading https://github.com/kimiyoung/planetoid/raw/master/data/ind.citeseer.graph
Downloading https://github.com/kimiyoung/planetoid/raw/master/data/ind.citeseer.test.index
Processing...
Done!
.
test/datasets/test_snap_dataset.py Downloading https://snap.stanford.edu/data/facebook.tar.gz
/tmp/7382217215497312526/ego-facebook/raw/facebook.tar.gz
Extracting /tmp/7382217215497312526/ego-facebook/raw/facebook.tar.gz
Processing...
Done!
Downloading https://snap.stanford.edu/data/soc-Slashdot0811.txt.gz
/tmp/7382217215497312526/soc-slashdot0811/raw/soc-Slashdot0811.txt.gz
Extracting /tmp/7382217215497312526/soc-slashdot0811/raw/soc-Slashdot0811.txt.gz
Processing...
Done!
Downloading https://snap.stanford.edu/data/wiki-Vote.txt.gz
/tmp/7382217215497312526/wiki-vote/raw/wiki-Vote.txt.gz
Extracting /tmp/7382217215497312526/wiki-vote/raw/wiki-Vote.txt.gz
Processing...
Done!
.
test/datasets/test_suite_sparse.py Downloading https://sparse.tamu.edu/mat/DIMACS10/citationCiteseer.mat
Processing...
Done!
Downloading https://sparse.tamu.edu/mat/HB/illc1850.mat
Processing...
Done!
.
test/io/test_off.py ..
test/nn/test_data_parallel.py .
test/nn/test_inits.py ..
test/nn/test_meta.py ..
test/nn/test_reshape.py .
test/nn/conv/test_agnn_conv.py ..
test/nn/conv/test_appnp.py .
test/nn/conv/test_arma_conv.py .
test/nn/conv/test_cg_conv.py ..
test/nn/conv/test_cheb_conv.py .
test/nn/conv/test_cluster_gcn_conv.py .
test/nn/conv/test_create_gnn.py .
test/nn/conv/test_dna_conv.py .
test/nn/conv/test_edge_conv.py ..
test/nn/conv/test_feast_conv.py .
test/nn/conv/test_film_conv.py .
test/nn/conv/test_gat_conv.py .
test/nn/conv/test_gated_graph_conv.py .
test/nn/conv/test_gcn2_conv.py .
test/nn/conv/test_gcn_conv.py ...
test/nn/conv/test_gen_conv.py ...
test/nn/conv/test_gin_conv.py ..
test/nn/conv/test_gmm_conv.py ..
test/nn/conv/test_graph_conv.py .
test/nn/conv/test_gravnet_conv.py .
test/nn/conv/test_hypergraph_conv.py .
test/nn/conv/test_le_conv.py .
test/nn/conv/test_message_passing.py ....
test/nn/conv/test_mf_conv.py .
test/nn/conv/test_nn_conv.py .
test/nn/conv/test_pna_conv.py .
test/nn/conv/test_point_conv.py .
test/nn/conv/test_ppf_conv.py .
test/nn/conv/test_res_gated_graph_conv.py .
test/nn/conv/test_rgcn_conv.py .........
test/nn/conv/test_sage_conv.py .
test/nn/conv/test_sg_conv.py .
test/nn/conv/test_signed_conv.py .
test/nn/conv/test_spline_conv.py .
test/nn/conv/test_static_graph.py .
test/nn/conv/test_supergat_conv.py ..
test/nn/conv/test_tag_conv.py ..
test/nn/conv/test_transformer_conv.py .
test/nn/conv/test_x_conv.py .
test/nn/dense/test_dense_gcn_conv.py ..
test/nn/dense/test_dense_gin_conv.py ..
test/nn/dense/test_dense_graph_conv.py ......
test/nn/dense/test_dense_sage_conv.py ..
test/nn/dense/test_diff_pool.py .
test/nn/dense/test_mincut_pool.py .
test/nn/glob/test_attention.py .
test/nn/glob/test_glob.py ..
test/nn/glob/test_set2set.py .
test/nn/glob/test_sort.py ..
test/nn/models/test_autoencoder.py .....
test/nn/models/test_deep_graph_infomax.py .
test/nn/models/test_gnn_explainer.py ....
test/nn/models/test_graph_unet.py .
test/nn/models/test_jumping_knowledge.py .
test/nn/models/test_metapath2vec.py .
test/nn/models/test_node2vec.py .
test/nn/models/test_re_net.py Processing...
Done!
.
test/nn/models/test_signed_gcn.py .
test/nn/norm/test_batch_norm.py ..
test/nn/norm/test_diff_group_norm.py ..
test/nn/norm/test_graph_size_norm.py .
test/nn/norm/test_instance_norm.py ..
test/nn/norm/test_layer_norm.py ..
test/nn/norm/test_msg_norm.py .
test/nn/norm/test_pair_norm.py ..
test/nn/pool/test_asap.py .
test/nn/pool/test_avg_pool.py ...
test/nn/pool/test_consecutive.py .
test/nn/pool/test_edge_pool.py ....
test/nn/pool/test_graclus.py .
test/nn/pool/test_max_pool.py ...
test/nn/pool/test_sag_pool.py .
test/nn/pool/test_topk_pool.py ...
test/nn/pool/test_voxel_grid.py ..
test/nn/unpool/test_knn_interpolate.py .
test/transforms/test_add_self_loops.py .
test/transforms/test_add_train_val_test_mask.py ..
test/transforms/test_cartesian.py .
test/transforms/test_center.py .
test/transforms/test_compose.py .
test/transforms/test_constant.py .
test/transforms/test_delaunay.py .
test/transforms/test_distance.py .
test/transforms/test_face_to_edge.py .
test/transforms/test_fixed_points.py .
test/transforms/test_gdc.py .
test/transforms/test_generate_normals.py .
test/transforms/test_grid_sampling.py .
test/transforms/test_knn_graph.py .
test/transforms/test_laplacian_lambda_max.py .
test/transforms/test_line_graph.py .
test/transforms/test_linear_transformation.py .
test/transforms/test_local_cartesian.py .
test/transforms/test_local_degree_profile.py .
test/transforms/test_normalize_features.py .
test/transforms/test_normalize_rotation.py .
test/transforms/test_normalize_scale.py .
test/transforms/test_one_hot_degree.py .
test/transforms/test_point_pair_features.py .
test/transforms/test_polar.py .
test/transforms/test_radius_graph.py .
test/transforms/test_random_flip.py .
test/transforms/test_random_rotate.py .
test/transforms/test_random_scale.py .
test/transforms/test_random_shear.py .
test/transforms/test_random_translate.py .
test/transforms/test_remove_isolated_nodes.py .
test/transforms/test_sample_points.py .
test/transforms/test_spherical.py .
test/transforms/test_target_indegree.py .
test/transforms/test_to_dense.py .
test/transforms/test_to_superpixels.py Extracting /tmp/8945519393637619686/MNIST/raw/t10k-images-idx3-ubyte.gz
Extracting /tmp/8945519393637619686/MNIST/raw/t10k-labels-idx1-ubyte.gz
.
test/transforms/test_two_hop.py .
test/utils/test_convert.py ............
test/utils/test_degree.py .
test/utils/test_dropout.py .
test/utils/test_geodesic.py .
test/utils/test_get_laplacian.py .
test/utils/test_grid.py .
test/utils/test_isolated.py ..
test/utils/test_loop.py ......
test/utils/test_metric.py ..
test/utils/test_negative_sampling.py ...
test/utils/test_normalized_cut.py .
test/utils/test_random.py ...
test/utils/test_repeat.py .
test/utils/test_softmax.py ..
test/utils/test_sort_edge_index.py .
test/utils/test_sparse.py .
test/utils/test_subgraph.py ..
test/utils/test_to_dense_adj.py ..
test/utils/test_to_dense_batch.py .
test/utils/test_train_test_split_edges.py .
test/utils/test_undirected.py ..
test/visualization/test_influence.py .

=============================================================================== warnings summary ===============================================================================
test/data/test_dataset.py:5
  /mnt/HDD4TB3/pytorch_geometric_master/test/data/test_dataset.py:5: PytestCollectionWarning: cannot collect test class 'TestDataset' because it has a __init__ constructor (from: test/data/test_dataset.py)
    class TestDataset(InMemoryDataset):

test/nn/test_data_parallel.py::test_data_parallel
  /home/gabby-suwichaya/anaconda3/envs/pygeo/lib/python3.6/site-packages/torch/nn/parallel/data_parallel.py:30: UserWarning: 
      There is an imbalance between your GPUs. You may want to exclude GPU 0 which
      has less than 75% of the memory or cores of GPU 1. You can do so by setting
      the device_ids argument to DataParallel, or by setting the CUDA_VISIBLE_DEVICES
      environment variable.
    warnings.warn(imbalance_warn.format(device_ids[min_pos], device_ids[max_pos]))

test/nn/conv/test_spline_conv.py::test_spline_conv
  /mnt/HDD4TB3/pytorch_geometric_master/torch_geometric/nn/conv/spline_conv.py:118: UserWarning: We do not recommend using the non-optimized CPU version of `SplineConv`. If possible, please move your data to GPU.
    'We do not recommend using the non-optimized CPU version of '

test/nn/conv/test_spline_conv.py::test_spline_conv
test/nn/conv/test_spline_conv.py::test_spline_conv
  /tmp/gabby-suwichaya_pyg_jit/tmp6_5h820r.py:180: UserWarning: We do not recommend using the non-optimized CPU version of `SplineConv`. If possible, please move your data to GPU.
    warnings.warn(

test/nn/conv/test_spline_conv.py::test_spline_conv
  /tmp/gabby-suwichaya_pyg_jit/tmpu4ks_3na.py:180: UserWarning: We do not recommend using the non-optimized CPU version of `SplineConv`. If possible, please move your data to GPU.
    warnings.warn(

test/nn/conv/test_spline_conv.py::test_spline_conv
test/nn/conv/test_spline_conv.py::test_spline_conv
test/nn/conv/test_spline_conv.py::test_spline_conv
  /tmp/gabby-suwichaya_pyg_jit/tmpftwi8ju2.py:180: UserWarning: We do not recommend using the non-optimized CPU version of `SplineConv`. If possible, please move your data to GPU.
    warnings.warn(

test/nn/conv/test_spline_conv.py::test_spline_conv
test/nn/conv/test_spline_conv.py::test_spline_conv
  /tmp/gabby-suwichaya_pyg_jit/tmp0ij3x473.py:180: UserWarning: We do not recommend using the non-optimized CPU version of `SplineConv`. If possible, please move your data to GPU.
    warnings.warn(

test/transforms/test_to_superpixels.py::test_to_superpixels
  /home/gabby-suwichaya/anaconda3/envs/pygeo/lib/python3.6/site-packages/torchvision/datasets/mnist.py:479: UserWarning: The given NumPy array is not writeable, and PyTorch does not support non-writeable tensors. This means you can write to the underlying (supposedly non-writeable) NumPy array using the tensor. You may want to copy the array to protect its data or make it writeable before converting it to a tensor. This type of warning will be suppressed for the rest of this program. (Triggered internally at  /opt/conda/conda-bld/pytorch_1614378063927/work/torch/csrc/utils/tensor_numpy.cpp:143.)
    return torch.from_numpy(parsed.astype(m[2], copy=False)).view(*s)

test/transforms/test_to_superpixels.py::test_to_superpixels
  /home/gabby-suwichaya/anaconda3/envs/pygeo/lib/python3.6/importlib/_bootstrap.py:219: RuntimeWarning: numpy.ufunc size changed, may indicate binary incompatibility. Expected 192 from C header, got 216 from PyObject
    return f(*args, **kwds)

test/transforms/test_to_superpixels.py::test_to_superpixels
test/transforms/test_to_superpixels.py::test_to_superpixels
test/transforms/test_to_superpixels.py::test_to_superpixels
test/transforms/test_to_superpixels.py::test_to_superpixels
test/transforms/test_to_superpixels.py::test_to_superpixels
test/transforms/test_to_superpixels.py::test_to_superpixels
  /home/gabby-suwichaya/anaconda3/envs/pygeo/lib/python3.6/site-packages/skimage/util/dtype.py:226: DeprecationWarning: Converting `np.inexact` or `np.floating` to a dtype is deprecated. The current result is `float64` which is not strictly correct.
    dtypeobj_out = np.dtype(dtype)

test/utils/test_convert.py::test_to_networkx
test/utils/test_convert.py::test_to_networkx
test/utils/test_convert.py::test_to_networkx_undirected
test/utils/test_convert.py::test_to_networkx_undirected
  /home/gabby-suwichaya/anaconda3/envs/pygeo/lib/python3.6/site-packages/numpy/matrixlib/defmatrix.py:69: PendingDeprecationWarning: the matrix subclass is not the recommended way to represent matrices or deal with linear algebra (see https://docs.scipy.org/doc/numpy/user/numpy-for-matlab-users.html). Please adjust your code to use regular ndarray.
    return matrix(data, dtype=dtype, copy=False)

-- Docs: https://docs.pytest.org/en/stable/warnings.html

---------- coverage: platform linux, python 3.6.13-final-0 -----------
Name                                                    Stmts   Miss  Cover
---------------------------------------------------------------------------
torch_geometric/__init__.py                                26      8    69%
torch_geometric/data/__init__.py                           12      0   100%
torch_geometric/data/batch.py                             176     30    83%
torch_geometric/data/cluster.py                            82      4    95%
torch_geometric/data/data.py                              191     13    93%
torch_geometric/data/dataloader.py                         49      6    88%
torch_geometric/data/dataset.py                           102      3    97%
torch_geometric/data/download.py                           16      0   100%
torch_geometric/data/graph_saint.py                        96      1    99%
torch_geometric/data/in_memory_dataset.py                  91     12    87%
torch_geometric/data/makedirs.py                            6      0   100%
torch_geometric/data/sampler.py                           119     49    59%
torch_geometric/data/temporal.py                           77     55    29%
torch_geometric/debug.py                                   22      0   100%
torch_geometric/io/__init__.py                              9      0   100%
torch_geometric/io/npz.py                                  18     11    39%
torch_geometric/io/obj.py                                  27     23    15%
torch_geometric/io/off.py                                  49      1    98%
torch_geometric/io/planetoid.py                            63      1    98%
torch_geometric/io/ply.py                                  11      6    45%
torch_geometric/io/sdf.py                                  25     17    32%
torch_geometric/io/tu.py                                   77      3    96%
torch_geometric/io/txt_array.py                             9      0   100%
torch_geometric/nn/__init__.py                             11      0   100%
torch_geometric/nn/acts.py                                  2      1    50%
torch_geometric/nn/conv/__init__.py                        40      0   100%
torch_geometric/nn/conv/agnn_conv.py                       37      0   100%
torch_geometric/nn/conv/appnp.py                           60     13    78%
torch_geometric/nn/conv/arma_conv.py                       59      0   100%
torch_geometric/nn/conv/cg_conv.py                         37      0   100%
torch_geometric/nn/conv/cheb_conv.py                       60      0   100%
torch_geometric/nn/conv/cluster_gcn_conv.py                55      0   100%
torch_geometric/nn/conv/dna_conv.py                       137      2    99%
torch_geometric/nn/conv/edge_conv.py                       49      0   100%
torch_geometric/nn/conv/feast_conv.py                      49      0   100%
torch_geometric/nn/conv/film_conv.py                       64      2    97%
torch_geometric/nn/conv/gat_conv.py                        96      0   100%
torch_geometric/nn/conv/gated_graph_conv.py                34      0   100%
torch_geometric/nn/conv/gcn2_conv.py                       67      5    93%
torch_geometric/nn/conv/gcn_conv.py                        93      2    98%
torch_geometric/nn/conv/gen_conv.py                        94     15    84%
torch_geometric/nn/conv/gin_conv.py                        66      1    98%
torch_geometric/nn/conv/gmm_conv.py                        65      0   100%
torch_geometric/nn/conv/graph_conv.py                      34      0   100%
torch_geometric/nn/conv/gravnet_conv.py                    53      0   100%
torch_geometric/nn/conv/hypergraph_conv.py                 73      1    99%
torch_geometric/nn/conv/le_conv.py                         26      0   100%
torch_geometric/nn/conv/message_passing.py                173      1    99%
torch_geometric/nn/conv/mf_conv.py                         55      0   100%
torch_geometric/nn/conv/nn_conv.py                         44      0   100%
torch_geometric/nn/conv/pna_conv.py                       109      7    94%
torch_geometric/nn/conv/point_conv.py                      43      0   100%
torch_geometric/nn/conv/ppf_conv.py                        50      0   100%
torch_geometric/nn/conv/res_gated_graph_conv.py            49      0   100%
torch_geometric/nn/conv/rgcn_conv.py                      135      2    99%
torch_geometric/nn/conv/sage_conv.py                       43      0   100%
torch_geometric/nn/conv/sg_conv.py                         42      0   100%
torch_geometric/nn/conv/signed_conv.py                     59      0   100%
torch_geometric/nn/conv/spline_conv.py                     53      0   100%
torch_geometric/nn/conv/supergat_conv.py                  101      4    96%
torch_geometric/nn/conv/tag_conv.py                        36      0   100%
torch_geometric/nn/conv/transformer_conv.py                78     11    86%
torch_geometric/nn/conv/utils/__init__.py                   0      0   100%
torch_geometric/nn/conv/utils/helpers.py                    5      1    80%
torch_geometric/nn/conv/utils/inspector.py                 63      0   100%
torch_geometric/nn/conv/utils/jit.py                       16      0   100%
torch_geometric/nn/conv/utils/typing.py                    80      2    98%
torch_geometric/nn/conv/wl_conv.py                         44     31    30%
torch_geometric/nn/conv/x_conv.py                          64      0   100%
torch_geometric/nn/dense/__init__.py                        9      0   100%
torch_geometric/nn/dense/dense_gcn_conv.py                 35      0   100%
torch_geometric/nn/dense/dense_gin_conv.py                 27      0   100%
torch_geometric/nn/dense/dense_graph_conv.py               36      0   100%
torch_geometric/nn/dense/dense_sage_conv.py                29      0   100%
torch_geometric/nn/dense/diff_pool.py                      18      0   100%
torch_geometric/nn/dense/mincut_pool.py                    35      0   100%
torch_geometric/nn/glob/__init__.py                         6      0   100%
torch_geometric/nn/glob/attention.py                       24      0   100%
torch_geometric/nn/glob/glob.py                            11      0   100%
torch_geometric/nn/glob/set2set.py                         28      0   100%
torch_geometric/nn/glob/sort.py                            19      0   100%
torch_geometric/nn/inits.py                                37      4    89%
torch_geometric/nn/meta.py                                 26      0   100%
torch_geometric/nn/models/__init__.py                      17      0   100%
torch_geometric/nn/models/autoencoder.py                   91      0   100%
torch_geometric/nn/models/correct_and_smooth.py            44     34    23%
torch_geometric/nn/models/deep_graph_infomax.py            37      0   100%
torch_geometric/nn/models/deepgcn.py                       44     36    18%
torch_geometric/nn/models/dimenet.py                      280    227    19%
torch_geometric/nn/models/dimenet_utils.py                 98     86    12%
torch_geometric/nn/models/gnn_explainer.py                132      7    95%
torch_geometric/nn/models/graph_unet.py                    78      0   100%
torch_geometric/nn/models/jumping_knowledge.py             32      0   100%
torch_geometric/nn/models/label_prop.py                    37     22    41%
torch_geometric/nn/models/metapath2vec.py                 107      2    98%
torch_geometric/nn/models/node2vec.py                      76      2    97%
torch_geometric/nn/models/re_net.py                        94      0   100%
torch_geometric/nn/models/schnet.py                       198    161    19%
torch_geometric/nn/models/signed_gcn.py                    93      0   100%
torch_geometric/nn/models/tgn.py                          164    128    22%
torch_geometric/nn/norm/__init__.py                         9      0   100%
torch_geometric/nn/norm/batch_norm.py                      12      1    92%
torch_geometric/nn/norm/diff_group_norm.py                 39      0   100%
torch_geometric/nn/norm/graph_size_norm.py                 11      1    91%
torch_geometric/nn/norm/instance_norm.py                   40      0   100%
torch_geometric/nn/norm/layer_norm.py                      36      0   100%
torch_geometric/nn/norm/msg_norm.py                        16      1    94%
torch_geometric/nn/norm/pair_norm.py                       23      0   100%
torch_geometric/nn/pool/__init__.py                        30      6    80%
torch_geometric/nn/pool/asap.py                            66      0   100%
torch_geometric/nn/pool/avg_pool.py                        33      0   100%
torch_geometric/nn/pool/consecutive.py                      6      0   100%
torch_geometric/nn/pool/edge_pool.py                       77      0   100%
torch_geometric/nn/pool/graclus.py                          7      0   100%
torch_geometric/nn/pool/max_pool.py                        33      0   100%
torch_geometric/nn/pool/pool.py                            16      0   100%
torch_geometric/nn/pool/sag_pool.py                        34      0   100%
torch_geometric/nn/pool/topk_pool.py                       73      0   100%
torch_geometric/nn/pool/voxel_grid.py                      22      0   100%
torch_geometric/nn/reshape.py                              10      0   100%
torch_geometric/nn/unpool/__init__.py                       3      0   100%
torch_geometric/nn/unpool/knn_interpolate.py               13      0   100%
torch_geometric/transforms/__init__.py                     44      0   100%
torch_geometric/transforms/add_self_loops.py               13      0   100%
torch_geometric/transforms/add_train_val_test_mask.py      52      0   100%
torch_geometric/transforms/cartesian.py                    20      0   100%
torch_geometric/transforms/center.py                        6      0   100%
torch_geometric/transforms/compose.py                      10      0   100%
torch_geometric/transforms/constant.py                     15      0   100%
torch_geometric/transforms/delaunay.py                     18      0   100%
torch_geometric/transforms/distance.py                     18      0   100%
torch_geometric/transforms/face_to_edge.py                 16      0   100%
torch_geometric/transforms/fixed_points.py                 25      0   100%
torch_geometric/transforms/gcn_norm.py                     14     10    29%
torch_geometric/transforms/gdc.py                         196     42    79%
torch_geometric/transforms/generate_mesh_normals.py        18      0   100%
torch_geometric/transforms/grid_sampling.py                30      1    97%
torch_geometric/transforms/knn_graph.py                    18      0   100%
torch_geometric/transforms/laplacian_lambda_max.py         21      0   100%
torch_geometric/transforms/line_graph.py                   44      0   100%
torch_geometric/transforms/linear_transformation.py        13      0   100%
torch_geometric/transforms/local_cartesian.py              22      1    95%
torch_geometric/transforms/local_degree_profile.py         23      0   100%
torch_geometric/transforms/normalize_features.py            6      0   100%
torch_geometric/transforms/normalize_rotation.py           23      0   100%
torch_geometric/transforms/normalize_scale.py              11      0   100%
torch_geometric/transforms/one_hot_degree.py               19      0   100%
torch_geometric/transforms/point_pair_features.py          21      0   100%
torch_geometric/transforms/polar.py                        25      0   100%
torch_geometric/transforms/radius_graph.py                 14      0   100%
torch_geometric/transforms/random_flip.py                  13      0   100%
torch_geometric/transforms/random_rotate.py                25      0   100%
torch_geometric/transforms/random_scale.py                 11      0   100%
torch_geometric/transforms/random_shear.py                 13      0   100%
torch_geometric/transforms/random_translate.py             18      0   100%
torch_geometric/transforms/remove_isolated_nodes.py        16      0   100%
torch_geometric/transforms/sample_points.py                33      0   100%
torch_geometric/transforms/sign.py                         21     15    29%
torch_geometric/transforms/spherical.py                    27      0   100%
torch_geometric/transforms/target_indegree.py              21      0   100%
torch_geometric/transforms/to_dense.py                     35      0   100%
torch_geometric/transforms/to_sparse_tensor.py             29     24    17%
torch_geometric/transforms/to_superpixels.py               27      0   100%
torch_geometric/transforms/to_undirected.py                10      6    40%
torch_geometric/transforms/two_hop.py                      22      0   100%
torch_geometric/typing.py                                  10      0   100%
torch_geometric/utils/__init__.py                          26      0   100%
torch_geometric/utils/convert.py                           70      2    97%
torch_geometric/utils/degree.py                             8      0   100%
torch_geometric/utils/dropout.py                           23      0   100%
torch_geometric/utils/geodesic.py                          36      3    92%
torch_geometric/utils/get_laplacian.py                     31      0   100%
torch_geometric/utils/grid.py                              28      0   100%
torch_geometric/utils/hetero.py                            28     28     0%
torch_geometric/utils/homophily.py                         12      6    50%
torch_geometric/utils/isolated.py                          28      0   100%
torch_geometric/utils/loop.py                              45      0   100%
torch_geometric/utils/metric.py                            58      0   100%
torch_geometric/utils/negative_sampling.py                 59      5    92%
torch_geometric/utils/normalized_cut.py                     8      0   100%
torch_geometric/utils/num_nodes.py                         30     15    50%
torch_geometric/utils/random.py                            55      0   100%
torch_geometric/utils/repeat.py                            12      0   100%
torch_geometric/utils/softmax.py                           22     15    32%
torch_geometric/utils/sort_edge_index.py                    6      0   100%
torch_geometric/utils/sparse.py                             5      0   100%
torch_geometric/utils/subgraph.py                          51      2    96%
torch_geometric/utils/to_dense_adj.py                      25      0   100%
torch_geometric/utils/to_dense_batch.py                    23      0   100%
torch_geometric/utils/train_test_split_edges.py            34      0   100%
torch_geometric/utils/tree_decomposition.py                81     73    10%
torch_geometric/utils/undirected.py                        20      0   100%
torch_geometric/visualization/__init__.py                   2      0   100%
torch_geometric/visualization/influence.py                 10      0   100%
---------------------------------------------------------------------------
TOTAL                                                    8549   1310    85%

================================================================= 245 passed, 23 warnings in 110.00s (0:01:50) =================================================================
rusty1s commented 3 years ago

Awesome. I applied the change to the test suite.