arangoml / fastgraphml

Given an input graph (ArangoDB or PyG) it generates graph embeddings using Low-Code framework built on top of PyG.
65 stars 7 forks source link

import issue #22

Open yousshark opened 1 month ago

yousshark commented 1 month ago

Error message indicating that there is a circular import issue in the fastgraphml package, specifically with the DMGI model. Note : Circular imports occur when two or more modules depend on each other directly or indirectly, causing an import loop.

yousshark commented 1 month ago

`--------------------------------------------------------------------------- ImportError Traceback (most recent call last)

in () 1 import torch ----> 2 from fastgraphml.graph_embeddings import DMGI, GAT, SAGE, METAPATH2VEC 2 frames /usr/local/lib/python3.10/dist-packages/fastgraphml/__init__.py in 1 from arango_datasets.datasets import Datasets 2 ----> 3 from fastgraphml.graph_embeddings.models.dmgi import DMGI 4 from fastgraphml.graph_embeddings.models.gat import GAT 5 from fastgraphml.graph_embeddings.models.graph_sage import SAGE /usr/local/lib/python3.10/dist-packages/fastgraphml/graph_embeddings/models/dmgi.py in 11 from torch_geometric.typing import Adj, EdgeType, OptPairTensor 12 ---> 13 from ..utils import GraphUtils 14 15 # check for gpu /usr/local/lib/python3.10/dist-packages/fastgraphml/graph_embeddings/__init__.py in ----> 1 from fastgraphml.graph_embeddings.models.dmgi import DMGI 2 from fastgraphml.graph_embeddings.models.gat import GAT 3 from fastgraphml.graph_embeddings.models.graph_sage import SAGE 4 from fastgraphml.graph_embeddings.models.metapath2vec import METAPATH2VEC 5 ImportError: cannot import name 'DMGI' from partially initialized module 'fastgraphml.graph_embeddings.models.dmgi' (most likely due to a circular import) (/usr/local/lib/python3.10/dist-packages/fastgraphml/graph_embeddings/models/dmgi.py)`