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

Some questions of Examples/subgraph_matching #52

Open
foresthao opened this issue Jul 21, 2023 · 0 comments
Open

Some questions of Examples/subgraph_matching #52

foresthao opened this issue Jul 21, 2023 · 0 comments

Comments

@foresthao
Copy link

Hello everyone:

I'm trying to learn the examples. All the example can run smoothly except subgraph_matching.
When I run exmaples\subgraph_matching\train.py

but i am getting an error: TypeError: Transform function returns a value of unknown type (<class 'networkx.classes.graph.Graph'>)
the full error is:
Traceback (most recent call last):
File "D:\coding\Demo_learn\deepsnap\examples\subgraph_matching\train_single_proc.py", line 241, in
main()
File "D:\coding\Demo_learn\deepsnap\examples\subgraph_matching\train_single_proc.py", line 225, in main
data_source = data.DataSource(args.dataset)
File "D:\coding\Demo_learn\deepsnap\examples\subgraph_matching\data.py", line 57, in init
self.train, self.test, _ = load_dataset(dataset_name)
File "D:\coding\Demo_learn\deepsnap\examples\subgraph_matching\data.py", line 46, in load_dataset
dataset = dataset.apply_transform(lambda g: g.G.subgraph(max(nx.connected_components(g.G), key=len)))
File "D:\coding\Demo_learn\deepsnap\deepsnap\dataset.py", line 1176, in apply_transform
for graph in self.graphs
File "D:\coding\Demo_learn\deepsnap\deepsnap\dataset.py", line 1176, in
for graph in self.graphs
File "D:\coding\Demo_learn\deepsnap\deepsnap\graph.py", line 1008, in apply_transform
"Transform function returns a value of unknown type "
TypeError: Transform function returns a value of unknown type (<class 'networkx.classes.graph.Graph'>)

I have try, but I did find why this error happened.
I have uesed the example dataset 'enzymes' ‘cox2’,the error above will happen.
When i use the example dataset 'imdb-binary', the error with same with #44, TypeError: zip argument #2 must support iteration

I think maybe networkx and pyg graph have to convert.
I hope to get answer soon.

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

1 participant