{"action":"created","issue":{"url":"https://api.github.com/repos/rusty1s/pytorch_geometric/issues/4","repository_url":"https://api.github.com/repos/rusty1s/pytorch_geometric","labels_url":"https://api.github.com/repos/rusty1s/pytorch_geometric/issues/4/labels{/name}","comments_url":"https://api.github.com/repos/rusty1s/pytorch_geometric/issues/4/comments","events_url":"https://api.github.com/repos/rusty1s/pytorch_geometric/issues/4/events","html_url":"https://github.com/rusty1s/pytorch_geometric/issues/4","id":311573537,"number":4,"title":"testing pytorch_geometric fails! ","user":{"login":"emanhamed","id":6710293,"avatar_url":"https://avatars3.githubusercontent.com/u/6710293?v=4","gravatar_id":"","url":"https://api.github.com/users/emanhamed","html_url":"https://github.com/emanhamed","followers_url":"https://api.github.com/users/emanhamed/followers","following_url":"https://api.github.com/users/emanhamed/following{/other_user}","gists_url":"https://api.github.com/users/emanhamed/gists{/gist_id}","starred_url":"https://api.github.com/users/emanhamed/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/emanhamed/subscriptions","organizations_url":"https://api.github.com/users/emanhamed/orgs","repos_url":"https://api.github.com/users/emanhamed/repos","events_url":"https://api.github.com/users/emanhamed/events{/privacy}","received_events_url":"https://api.github.com/users/emanhamed/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-04-05T11:31:03Z","updated_at":"2018-04-06T08:47:05Z","closed_at":null,"author_association":"NONE","body":"\r\nI have followed the instructions for installing pytorch_geometric. However, I'm receiving some errors while testing. I have searched a lot but I didn't find solutions. It seems that it is something related to the code. Here is what I'm getting. \r\n```\r\n`root@Linux-HUETOS:~/pytorch_geometric-master# nosetests\r\n.......E..E..E..EEEE.................\r\n======================================================================\r\nERROR: test_coalesce_gpu (torch_geometric.nn.functional.pool.coalesce_test.CoalesceTest)\r\n----------------------------------------------------------------------\r\nTraceback (most recent call last):\r\n  File \"/home/eman/pytorch_geometric-master/torch_geometric/nn/functional/pool/coalesce_test.py\", line 60, in test_coalesce_gpu\r\n    index = coalesce(index)\r\n  File \"/home/eman/pytorch_geometric-master/torch_geometric/nn/functional/pool/coalesce.py\", line 15, in coalesce\r\n    _, perm = unique_by_key(e, perm)\r\n  File \"/usr/local/lib/python2.7/dist-packages/torch_unique/functions/unique_by_key.py\", line 30, in unique_by_key\r\n    func = getattr(ffi, 'uniqueByKey_cuda_{}'.format(typename))\r\nAttributeError: 'module' object has no attribute 'uniqueByKey_cuda_Long'\r\n\r\n======================================================================\r\nERROR: test_auto_backward (torch_geometric.nn.functional.pool.pool_test.PoolTest)\r\n----------------------------------------------------------------------\r\nTraceback (most recent call last):\r\n  File \"/home/eman/pytorch_geometric-master/torch_geometric/nn/functional/pool/pool_test.py\", line 86, in test_auto_backward\r\n    test = gradcheck(op, (input, ), eps=1e-6, atol=1e-4)\r\n  File \"/home/eman/.local/lib/python2.7/site-packages/torch/autograd/gradcheck.py\", line 162, in gradcheck\r\n    output = _differentiable_outputs(func(*inputs))\r\n  File \"/home/eman/pytorch_geometric-master/torch_geometric/nn/functional/pool/pool_test.py\", line 13, in max_pool_backward\r\n    return _max_pool(input, cluster)\r\nTypeError: _max_pool() takes exactly 3 arguments (2 given)\r\n\r\n======================================================================\r\nERROR: test_avg_forward_gpu (torch_geometric.nn.functional.pool.pool_test.PoolTest)\r\n----------------------------------------------------------------------\r\nTraceback (most recent call last):\r\n  File \"/home/eman/pytorch_geometric-master/torch_geometric/nn/functional/pool/pool_test.py\", line 117, in test_avg_forward_gpu\r\n    output, index, position = avg_pool(input, index, position, cluster)\r\n  File \"/home/eman/pytorch_geometric-master/torch_geometric/nn/functional/pool/pool.py\", line 77, in avg_pool\r\n    x = _avg_pool(input, cluster, size, weight_values)\r\n  File \"/home/eman/pytorch_geometric-master/torch_geometric/nn/functional/pool/pool.py\", line 62, in _avg_pool\r\n    x = scatter_mean(cluster, input, dim=0, fill_value=fill)\r\n  File \"/usr/local/lib/python2.7/dist-packages/torch_scatter/functions/mean.py\", line 124, in scatter_mean\r\n    return scatter_mean_(output, index, input, dim)\r\n  File \"/usr/local/lib/python2.7/dist-packages/torch_scatter/functions/mean.py\", line 74, in scatter_mean_\r\n    scatter(ScatterMean, 'mean', dim, init, index, input, count)\r\n  File \"/usr/local/lib/python2.7/dist-packages/torch_scatter/functions/scatter.py\", line 46, in scatter\r\n    return ffi_scatter(name, dim, *data)\r\n  File \"/usr/local/lib/python2.7/dist-packages/torch_scatter/functions/ffi.py\", line 31, in scatter\r\n    func = getattr(ffi, 'scatter_{}_{}{}'.format(name, cuda, typename))\r\nAttributeError: 'module' object has no attribute 'scatter_mean_cuda_Float'\r\n\r\n======================================================================\r\nERROR: test_max_forward_gpu (torch_geometric.nn.functional.pool.pool_test.PoolTest)\r\n----------------------------------------------------------------------\r\nTraceback (most recent call last):\r\n  File \"/home/eman/pytorch_geometric-master/torch_geometric/nn/functional/pool/pool_test.py\", line 100, in test_max_forward_gpu\r\n    output, index, position = max_pool(input, index, position, cluster)\r\n  File \"/home/eman/pytorch_geometric-master/torch_geometric/nn/functional/pool/pool.py\", line 45, in max_pool\r\n    x = _max_pool(input, cluster, size)\r\n  File \"/home/eman/pytorch_geometric-master/torch_geometric/nn/functional/pool/pool.py\", line 37, in _max_pool\r\n    x = scatter_max(cluster, input, dim=0, fill_value=fill)[0]\r\n  File \"/usr/local/lib/python2.7/dist-packages/torch_scatter/functions/max.py\", line 129, in scatter_max\r\n    return scatter_max_(output, index, input, dim)\r\n  File \"/usr/local/lib/python2.7/dist-packages/torch_scatter/functions/max.py\", line 78, in scatter_max_\r\n    return scatter(ScatterMax, 'max', dim, output, index, input, arg)\r\n  File \"/usr/local/lib/python2.7/dist-packages/torch_scatter/functions/scatter.py\", line 46, in scatter\r\n    return ffi_scatter(name, dim, *data)\r\n  File \"/usr/local/lib/python2.7/dist-packages/torch_scatter/functions/ffi.py\", line 31, in scatter\r\n    func = getattr(ffi, 'scatter_{}_{}{}'.format(name, cuda, typename))\r\nAttributeError: 'module' object has no attribute 'scatter_max_cuda_Float'\r\n\r\n======================================================================\r\nERROR: Failure: ImportError (cannot import name voxel_max_pool)\r\n----------------------------------------------------------------------\r\nTraceback (most recent call last):\r\n  File \"/usr/local/lib/python2.7/dist-packages/nose/loader.py\", line 418, in loadTestsFromName\r\n    addr.filename, addr.module)\r\n  File \"/usr/local/lib/python2.7/dist-packages/nose/importer.py\", line 47, in importFromPath\r\n    return self.importFromDir(dir_path, fqname)\r\n  File \"/usr/local/lib/python2.7/dist-packages/nose/importer.py\", line 94, in importFromDir\r\n    mod = load_module(part_fqname, fh, filename, desc)\r\n  File \"/home/eman/pytorch_geometric-master/torch_geometric/nn/functional/pool/voxel_pool_test.py\", line 7, in <module>\r\n    from .voxel_pool import voxel_max_pool\r\nImportError: cannot import name voxel_max_pool\r\n\r\n======================================================================\r\nERROR: test_backward (torch_geometric.nn.functional.spline_conv.spline_conv_test.SplineConvTest)\r\n----------------------------------------------------------------------\r\nTraceback (most recent call last):\r\n  File \"/home/eman/pytorch_geometric-master/torch_geometric/nn/functional/spline_conv/spline_conv_test.py\", line 139, in test_backward\r\n    K, True,dtype='double')\r\n  File \"/home/eman/pytorch_geometric-master/torch_geometric/nn/functional/spline_conv/spline_conv_gpu.py\", line 185, in get_weighting_backward_kernel\r\n    K=K)\r\n  File \"cupy/util.pyx\", line 39, in cupy.util.memoize.decorator.ret\r\n  File \"/home/eman/pytorch_geometric-master/torch_geometric/utils/cuda.py\", line 37, in load_kernel\r\n    kernel_code = cupy.cuda.compile_with_cache(code)\r\n  File \"/usr/local/lib/python2.7/dist-packages/cupy/cuda/compiler.py\", line 152, in compile_with_cache\r\n    ptx = compile_using_nvrtc(source, options, arch)\r\n  File \"/usr/local/lib/python2.7/dist-packages/cupy/cuda/compiler.py\", line 70, in compile_using_nvrtc\r\n    ptx = prog.compile(options)\r\n  File \"/usr/local/lib/python2.7/dist-packages/cupy/cuda/compiler.py\", line 233, in compile\r\n    raise CompileException(log, self.src, self.name, options)\r\nCompileException: /tmp/tmph73gef/kern.cu(44): error: no instance of overloaded function \"atomicAdd\" matches the argument list\r\n            argument types are: (double *, double)\r\n\r\n/tmp/tmph73gef/kern.cu(50): error: no instance of overloaded function \"atomicAdd\" matches the argument list\r\n            argument types are: (double *, double)\r\n\r\n2 errors detected in the compilation of \"/tmp/tmph73gef/kern.cu\".\r\n\r\n-------------------- >> begin captured stdout << ---------------------\r\n\r\n 0.8099  0.1667\r\n 0.6158  0.8041\r\n 0.8828  0.6689\r\n 0.7352  0.4808\r\n[torch.cuda.DoubleTensor of size 4x2 (GPU 0)]\r\n\r\n\r\n--------------------- >> end captured stdout << ----------------------\r\n\r\n======================================================================\r\nERROR: test_forward (torch_geometric.nn.modules.graph_conv_test.GraphConvTest)\r\n----------------------------------------------------------------------\r\nTraceback (most recent call last):\r\n  File \"/home/eman/pytorch_geometric-master/torch_geometric/nn/modules/graph_conv_test.py\", line 31, in test_forward\r\n    out = conv(adj, features)\r\n  File \"/home/eman/.local/lib/python2.7/site-packages/torch/nn/modules/module.py\", line 325, in __call__\r\n    result = self.forward(*input, **kwargs)\r\n  File \"/home/eman/pytorch_geometric-master/torch_geometric/nn/modules/graph_conv.py\", line 43, in forward\r\n    return graph_conv(x, edge_index, edge_attr, self.weight, self.bias)\r\n  File \"/home/eman/pytorch_geometric-master/torch_geometric/nn/functional/graph_conv.py\", line 28, in graph_conv\r\n    row, col = edge_index\r\nValueError: too many values to unpack\r\n\r\n----------------------------------------------------------------------\r\nRan 37 tests in 2.858s\r\n\r\nFAILED (errors=7)\r\n`\r\n```"},"comment":{"url":"https://api.github.com/repos/rusty1s/pytorch_geometric/issues/comments/379189458","html_url":"https://github.com/rusty1s/pytorch_geometric/issues/4#issuecomment-379189458","issue_url":"https://api.github.com/repos/rusty1s/pytorch_geometric/issues/4","id":379189458,"user":{"login":"emanhamed","id":6710293,"avatar_url":"https://avatars3.githubusercontent.com/u/6710293?v=4","gravatar_id":"","url":"https://api.github.com/users/emanhamed","html_url":"https://github.com/emanhamed","followers_url":"https://api.github.com/users/emanhamed/followers","following_url":"https://api.github.com/users/emanhamed/following{/other_user}","gists_url":"https://api.github.com/users/emanhamed/gists{/gist_id}","starred_url":"https://api.github.com/users/emanhamed/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/emanhamed/subscriptions","organizations_url":"https://api.github.com/users/emanhamed/orgs","repos_url":"https://api.github.com/users/emanhamed/repos","events_url":"https://api.github.com/users/emanhamed/events{/privacy}","received_events_url":"https://api.github.com/users/emanhamed/received_events","type":"User","site_admin":false},"created_at":"2018-04-06T08:47:05Z","updated_at":"2018-04-06T08:47:05Z","author_association":"NONE","body":"Actually not all the examples are working well. core.py is okay .. but some other files are not. For example mnist.py is not : \r\n```\r\nroot@Linux-HUETOS:~/pytorch_geometric-master/examples# python3 mnist.py \r\nTraceback (most recent call last):\r\n  File \"mnist.py\", line 102, in <module>\r\n    train(epoch)\r\n  File \"mnist.py\", line 84, in train\r\n    loss = F.nll_loss(model(data), data.target)\r\n  File \"/usr/local/lib/python3.5/dist-packages/torch/nn/modules/module.py\", line 325, in __call__\r\n    result = self.forward(*input, **kwargs)\r\n  File \"mnist.py\", line 49, in forward\r\n    data, _ = sparse_voxel_max_pool(data, 5, 0, CartesianAdj())\r\n  File \"../torch_geometric/nn/functional/pool/voxel_pool.py\", line 19, in sparse_voxel_max_pool\r\n    output = sparse_grid_cluster(pos_tensor, size, data.batch, start)\r\n  File \"/home/eman/.local/lib/python3.5/site-packages/torch_cluster/functions/grid.py\", line 76, in sparse_grid_cluster\r\n    position, size = _preprocess(position, size, batch, start)\r\n  File \"/home/eman/.local/lib/python3.5/site-packages/torch_cluster/functions/grid.py\", line 25, in _preprocess\r\n    elif start != 0:\r\n  File \"/usr/local/lib/python3.5/dist-packages/torch/tensor.py\", line 153, in __bool__\r\n    \" objects is ambiguous\")\r\nRuntimeError: bool value of non-empty torch.cuda.ByteTensor objects is ambiguous\r\n```\r\nand cora_gat.py is also not working and here is what I'm getting: \r\n\r\n```\r\nroot@Linux-HUETOS:~/pytorch_geometric-master/examples# python3 cora_gat.py \r\nTraceback (most recent call last):\r\n  File \"cora_gat.py\", line 70, in <module>\r\n    train()\r\n  File \"cora_gat.py\", line 52, in train\r\n    F.nll_loss(model()[train_mask], data.target[train_mask]).backward()\r\n  File \"/usr/local/lib/python3.5/dist-packages/torch/nn/modules/module.py\", line 325, in __call__\r\n    result = self.forward(*input, **kwargs)\r\n  File \"cora_gat.py\", line 35, in forward\r\n    x = F.elu(self.att1(data.input, data.index))\r\n  File \"/usr/local/lib/python3.5/dist-packages/torch/nn/modules/module.py\", line 325, in __call__\r\n    result = self.forward(*input, **kwargs)\r\n  File \"../torch_geometric/nn/modules/gat.py\", line 67, in forward\r\n    self.weight, self.att_weight, self.bias)\r\n  File \"../torch_geometric/nn/functional/gat.py\", line 41, in gat\r\n    alpha_sum = alpha.new(n, k).fill_(0).scatter_add_(0, var_row, alpha)\r\n  File \"/usr/local/lib/python3.5/dist-packages/torch/autograd/variable.py\", line 67, in __getattr__\r\n    return object.__getattribute__(self, name)\r\nAttributeError: 'Variable' object has no attribute 'new'\r\n```\r\n"}}
{"actor":{"display_login":"emanhamed"}}