Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

assertion error #15

Open
simosss opened this issue Dec 11, 2021 · 7 comments
Open

assertion error #15

simosss opened this issue Dec 11, 2021 · 7 comments
Labels
help wanted Extra attention is needed

Comments

@simosss
Copy link

simosss commented Dec 11, 2021

Hello!
I am trying to reproduce the results of the TIP paper in the framework of my graduate thesis.
I run prepare.py to completion as described in readme. But when I run the tip.py script I get an assertion error telling me that the edge_index is not of the torch.long type (I attach the full error). Any ideas on why this might be the case?

tip_error.txt

@ZillaRU
Copy link

ZillaRU commented Jan 5, 2022

Maybe you can cast the type of edge_index by edge_index.long() if edge_index is a torch tensor.

@simosss
Copy link
Author

simosss commented Feb 8, 2022

I am afraid it is not that simple in this case.
The model uses a Pytorch geometric Data structure (red by a pickle export) that contains multiple tensors. Not sure which of them causes the problem.
I tried to find my way through debbuging but I had to dive deep into the code and still haven't figured out a solution.
Obviously, other people seem to have rerun and reproduce the results in the past without problem, so I cannot understand why this error appears in the first place.

Thanks for trying to help!

@NYXFLOWER
Copy link
Owner

NYXFLOWER commented Feb 8, 2022

@ZillaRU, thank you for the suggestion!

Hi @simosss, as shown in the tip_error.txt file you provided, the error probably is caused by the conflict between the CUDA version installed on the computer (cu100) and the version supported by PyTorch (cu102).

C:\Users\simos\Anaconda3\envs\TIP\lib\site-packages\torch\cuda_init_.py:80:
UserWarning: CUDA initialization: The NVIDIA driver on your system is too old (found version 7050). Please update your GPU driver by downloading and installing a new version from the URL: http://www.nvidia.com/Download/index.aspx
Alternatively, go to: https://pytorch.org to install a PyTorch version that has been compiled with your version of the CUDA driver. (Triggered internally at ..\c10\cuda\CUDAFunctions.cpp:112.)

Could you please try to update your CUDA to version 10.2?

@NYXFLOWER NYXFLOWER added the help wanted Extra attention is needed label Feb 8, 2022
@simosss
Copy link
Author

simosss commented Feb 9, 2022

Hi @NYXFLOWER thanks for the suggestion!

Unfortunately, this doesn't seem to solve the problem. I updated cuda toolkit to version 10.2
and I get the same error only without the warning in the beginning.
In the past I have also tried to run it on cpu with the same result.

I don't know if the version of the pytorch and pytorch geometric are to be blamed,
since I am not able to reproduce the environment you mention on the README (I get conflicts when I try) and so I use the current stable versions (pytorch 1.10.2, pyg 2.0.3)

Any more thoughts would be more than welcome, thanks a lot!

@NYXFLOWER
Copy link
Owner

Thank you for the feedback, @simosss!

There is another stable environment with cuda 10.1, python 3.7.6, pytorch 1.4.0, torch-geometric 1.4.2, torch-scatter 2.0.4, torch-sparse 0.6.1, and torch-spline-conv 1.2.0 (see more details in tip_gpu_2.yml.zip).

For your convenience, here is the link for installing a PyG < 2.0 and its prerequisite packages: https://data.pyg.org/whl/.

I had tested this environment several days ago, and it ran successfully on multiple servers.
Hope it works this time!

@simosss
Copy link
Author

simosss commented Feb 27, 2022

Hello again @NYXFLOWER !

Thanks for the detailed description. I would probably be unable to install the particular environment without this extra help. Unfortunately I still get a similar (?) error, although a different one. (see attachment)

I am not sure what to make of it. I believe I recreated the environment you described accurately.
Maybe the environment was not the issue in the first place?
Could operation system have anything to do with it? I don't know.

tip_error_python3.7.6.txt

@NYXFLOWER
Copy link
Owner

Hi @simosss, I am sorry for the late reply. I hope you have solved this issue.

I recently met the same error as you mentioned in tip_error_python3.7.6.txt. I found it is caused by the wrong data type of two variables: data.gd_edge_index and data.gg_edge_index. I solved this issue by changing their type to torch.long:

data.gd_edge_index = data.gd_edge_index.type(torch.long)
data.gg_edge_index = data.gg_edge_index.type(torch.long)

@ZillaRU's suggestion in #15 (comment) also works. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants