AnacletoLAB / grape

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

get_available_models_for_node_embedding() returns NotImplementedError #47

Open Filco306 opened 1 year ago

Filco306 commented 1 year ago

I am trying to follow this tutorial to try out some embedding methods. However, running

>>> from grape import get_available_models_for_node_embedding
>>> 
>>> all_embedding_methods = get_available_models_for_node_embedding()
Traceback (most recent call last):
  File "/home/filco306/.envs/generalvenv/lib/python3.10/site-packages/embiggen/utils/abstract_models/abstract_model.py", line 730, in get_model_metadata
    "requires_edge_type_features": model_class.requires_edge_type_features(),
  File "/home/filco306/.envs/generalvenv/lib/python3.10/site-packages/embiggen/utils/abstract_models/abstract_model.py", line 380, in requires_edge_type_features
    raise NotImplementedError(
NotImplementedError: The `requires_edge_type_features` method must be implemented in the child classes of abstract model. It was not implemented in the class StubClass.

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/filco306/.envs/generalvenv/lib/python3.10/site-packages/embiggen/utils/abstract_models/abstract_model.py", line 763, in get_available_models_for_node_embedding
    df = get_models_dataframe()
  File "/home/filco306/.envs/generalvenv/lib/python3.10/site-packages/embiggen/utils/abstract_models/abstract_model.py", line 752, in get_models_dataframe
    [
  File "/home/filco306/.envs/generalvenv/lib/python3.10/site-packages/embiggen/utils/abstract_models/abstract_model.py", line 753, in <listcomp>
    get_model_metadata(model_class)
  File "/home/filco306/.envs/generalvenv/lib/python3.10/site-packages/embiggen/utils/abstract_models/abstract_model.py", line 742, in get_model_metadata
    raise NotImplementedError(
NotImplementedError: Some of the mandatory static methods were not implemented in model class StubClass. The previous exception was: The `requires_edge_type_features` method must be implemented in the child classes of abstract model. It was not implemented in the class StubClass.

Versions:

>>> grape.print_version()
{'GRAPE Version': '0.2.2', 'Python version': '3.10.6', 'Platform': 'Linux-5.4.0-150-generic-x86_64-with-glibc2.31', 'Threads number': 48, 'PyTorch version': '1.13.0', 'PyKEEN version': '1.9.0'}
embiggen==0.11.71
ensmallen==0.8.65

Is there a work-around this? Thank you for a great package!

zommiommy commented 1 year ago

I am trying to follow this tutorial to try out some embedding methods. However, running

>>> from grape import get_available_models_for_node_embedding
>>> 
>>> all_embedding_methods = get_available_models_for_node_embedding()
Traceback (most recent call last):
  File "/home/filco306/.envs/generalvenv/lib/python3.10/site-packages/embiggen/utils/abstract_models/abstract_model.py", line 730, in get_model_metadata
    "requires_edge_type_features": model_class.requires_edge_type_features(),
  File "/home/filco306/.envs/generalvenv/lib/python3.10/site-packages/embiggen/utils/abstract_models/abstract_model.py", line 380, in requires_edge_type_features
    raise NotImplementedError(
NotImplementedError: The `requires_edge_type_features` method must be implemented in the child classes of abstract model. It was not implemented in the class StubClass.

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/filco306/.envs/generalvenv/lib/python3.10/site-packages/embiggen/utils/abstract_models/abstract_model.py", line 763, in get_available_models_for_node_embedding
    df = get_models_dataframe()
  File "/home/filco306/.envs/generalvenv/lib/python3.10/site-packages/embiggen/utils/abstract_models/abstract_model.py", line 752, in get_models_dataframe
    [
  File "/home/filco306/.envs/generalvenv/lib/python3.10/site-packages/embiggen/utils/abstract_models/abstract_model.py", line 753, in <listcomp>
    get_model_metadata(model_class)
  File "/home/filco306/.envs/generalvenv/lib/python3.10/site-packages/embiggen/utils/abstract_models/abstract_model.py", line 742, in get_model_metadata
    raise NotImplementedError(
NotImplementedError: Some of the mandatory static methods were not implemented in model class StubClass. The previous exception was: The `requires_edge_type_features` method must be implemented in the child classes of abstract model. It was not implemented in the class StubClass.

Versions:

>>> grape.print_version()
{'GRAPE Version': '0.2.2', 'Python version': '3.10.6', 'Platform': 'Linux-5.4.0-150-generic-x86_64-with-glibc2.31', 'Threads number': 48, 'PyTorch version': '1.13.0', 'PyKEEN version': '1.9.0'}
embiggen==0.11.71
ensmallen==0.8.65

Is there a work-around this? Thank you for a great package!

Hi, we are looking into it!