-
Notifications
You must be signed in to change notification settings - Fork 56
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
Using the ogbl-biokg with DeepSNAP #35
Comments
Hello! I'm not a maintainer of the deepsnap package but I would be happy to try and help. Would you mind posting the code that you used, that resulted in the error message, so it is easier to spot what went wrong? I wonder whether what happened is that you created a heterogeneous graph object with v2 of pytorch-geometric, which might not yet be supported by deepsnap? If you have a pytorch-geometric A question for the developers of deepsnap: are you planning to update deepsnap to be compatible with |
Hi @anniekmyatt !
|
I just ran this and I'm getting the same error (I added the line This error occurs because the ogbl_biokg_dataset has an
About the node features: this should be a dictionary with keys of each node type (e.g. disease, drug...) and as values a torch tensor of dimension I am curious which deepsnap functionality specifically you would like to use? For an RDF graph like this (without node features), wouldn't a package like DGL-KE be more helpful as it has lots of embedding functionality that doesn't rely on message passing of node features? |
Hi @anniekmyatt ! Thanks for your reply. I tried to create a deepsnap HeteroGraph object from scratch here for the ogblbiokg graph. I followed the tutorial from deepsnap for heterogeneous graphs to create the object. One important step here is to relabel the nodes from the ogblbiokg since it starts with label 0 for every node type, but networkx requires consecutive node labels.
When I run this code, it creates a networkx graph, as shown in the tutorial. I can also convert it into a
But the object does not have the attribute
I am wondering why this is, since I followed the tutorial of the authors. Do you have any idea? Would be great if any of the authors could comment on this @farzaank @JiaxuanYou @RexYing @jmilldotdev ? P.S. The reason why I would like to use deepsnap is exactly that it can use node features, which I would add for another graph later on. |
Hi there!
I was just trying out to use the ogbl-biokg graph with DeepSNAP, more precisely using it as input for the link_prediction.py for heterogeneous graphs. Since deepSNAP requires a networkx or pytorch geometric object, I tried to convert the ogbl biokg graph into a pytorch geometric object and then to transform it to a HeteroGraph, as you point out in the tutorial here.
Yet, when I did that it threw an error since the graph would not have an 'edge_index':
How can I convert the ogbl-biokg graph into an object that can be used with deepSNAP?
I would very much appreciate any help!
The text was updated successfully, but these errors were encountered: