AnacletoLAB / grape

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

Error when using tensorflow embegging. #36

Open 13bmartens opened 1 year ago

13bmartens commented 1 year ago

Hi Team, did some experimentation and found this issue when trying different tensorflow based embedding approaches:

from grape.embedders import StructuredEmbeddingTensorFlow
embedding = StructuredEmbeddingTensorFlow().fit_transform(graph)

produces error:

ValueError: We have found an useless method in the class StubClass, implementing method Structured Embedding from library TensorFlow 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.

Anything I am doing wrong?

Thanks!

LucaCappelletti94 commented 1 year ago

Hi @13bmartens, that is a misleading error that I need to fix. The correct error would be that some dependency is missing, and therefore it cannot load the proper model.

The short of it is that, given the model you are trying to load, most likely you do not have tensorflow installed, do let me know if that is the case.

13bmartens commented 1 year ago

That was the initial reason, I installed tensorflow now and the error persists:

import tensorflow as tf print(tf.version)

2.12.0

LucaCappelletti94 commented 1 year ago

Ok! Could you please join the discord server, and we can look into it there in a call?