Skip to content
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

get_available_models_for_node_embedding() returns NotImplementedError #47

Open
Filco306 opened this issue Jul 4, 2023 · 1 comment
Open

Comments

@Filco306
Copy link

Filco306 commented Jul 4, 2023

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
Copy link
Collaborator

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants