AnacletoLAB / grape

🍇 GRAPE is a Rust/Python Graph Representation Learning library for Predictions and Evaluations
MIT License
502 stars 38 forks source link

ValueError when trying to use external embedder like in pykeen and karateClub #25

Closed gsanou closed 1 year ago

gsanou commented 1 year ago

Hello, Thanks you for your amaeing work, i'm a phD student working on the embeddings of biomedical data particularly in immunogenetics, and currently i'm comparing tools to embed data. I found your works very interesting. I got some issues when i try to use external model from pykeen and karateclub. i got this message :
ValueError: We have found an useless method in the class StubClass, implementing method HolE from library PyKEEN and task Node Embedding. It does not make sense to implement the `requires_positive_edge_weights` method when the `can_use_edge_weights` always returns False, as it is already handled in the root abstract model class.

Also for the vizualisation, when i did ```  from grape import GraphVisualizer visualizer = GraphVisualizer(kg.remove_disconnected_nodes()) visualizer.fit_and_plot_all(embedding)


I got this warning without no visualisation:  FutureWarning: The parameter `square_distances` has not effect and will be removed in version 1.3.
Thank you in advance for your answer
Gaoussou
LucaCappelletti94 commented 1 year ago

Hello @gsanou, please attach the code you used.

Moreover, be advised that the error you are getting is because you do not have installed PyKEEN; admittedly, it should be handled better, and I'll look into it.

Secondly, the FutureWarning error you see is a sklearn one, independent from 🍇.

LucaCappelletti94 commented 1 year ago

I have tested now on COLAB the following:

First, I install 🍇 and PyKEEN:

! pip install grape pykeen -Uq

and then I run the one-liner:

from grape import GraphVisualizer

GraphVisualizer("Cora", repository="linqs")\
    .fit_and_plot_all("HolE")

And you get:

image

I hope everything is clear.

gsanou commented 1 year ago

Thank you @LucaCappelletti94 . I think it was pykeen problem. i will close it. Gaoussou