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
The code fails when running a custom graph #9
Comments
Hi @rcap107, thanks for the detailed reporting. I guess if you change the name of |
Hello @yihong-chen, thanks for the quick reply. I realized later that I had a typo in my code, silly mistake. The code started running after fixing that problem, however now I have something entirely different.
Do you have any insight? I am using a colab notebook. Thanks |
Hi @rcap107, looking at the logs, it seems that the cross entropy loss I would suggest you check the input files. The repo expects inputs formatted as tab-separated triples like
For example,
or
If the input was provided as your above comment,
then the program would expect BTW feel free to share the colab link that reproduces this bug. Very happy to look into it. |
Hello, the colab notebook is here. There really isn't nothing fancy in it, I am modifying the files I mentioned in the OP manually then I import the train, valid and test files from my drive. I've attached those tsv files to this message. To reply to your previous question, the input is indeed in the format I need, and in the format you described. I am not completely sure how the algorithm is able to distinguish between positive and negative samples simply from the train/valid splits. Indeed, in all train/valid/test files, all samples would be labeled as "true". Is it done internally? Thanks for the help! |
Hi @rcap107, I checked your colab. It works well on CPU. For GPU, I tested it a bit and found that it works well with Pytorch 1.8.2 (LTS). The default pytorch in colab is 1.10. That's why the code fails. I created a colab notebook that runs successfully on your data. Feel free to ping me if it still fails.
Yes, every triple in train/valid/test files is a "true/positive" example. As for negative examples, we generate them by corrupting the triples. For example, given a triple |
Hello @yihong-chen, thanks a lot for all the help and for answering my questions. I tried the notebook you provided and it seems to work on my side as well. I do not have any further questions for the moment. |
Hello,
I am trying to run the code on a graph I have built that is not included among the choices provided in the repo. The graph I am working with is bipartite with typed edges.
To run the code, I prepared the list of triplets to be split in train, valid and test sets.
Triplets are saved in
.tsv
files:To run my dataset, I slightly modified the python scripts in the repo.
In
preprocess_dataset.py
I added the linedatasets = ['mydata']
to read from the foldersrc/src_data/mydata
. I was then able to run the script, which created and filled the folderdata/mydata
.In
main.py
, I modified the list of datasets by addingmydata
so that the code wouldn't raise an exception.Finally, I tried to run the code with the arguments specified in the readme:
Unfortunately, at this point the code fails because there is no
train.npy
file in the data folder. I assume that thetrain.npy
file should have been created by the preprocessing script, but for some reason that did not happen. The content of thedata
folder is the following:It's not clear to me how to run custom-made datasets from the readme. Could you help me with that?
The text was updated successfully, but these errors were encountered: