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

Tweak graph_db to run example script #4

Open
JDRomano2 opened this issue May 4, 2021 · 0 comments
Open

Tweak graph_db to run example script #4

JDRomano2 opened this issue May 4, 2021 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@JDRomano2
Copy link
Collaborator

The following example script should be used as a template for the "neo4j -> pytorch" method:

>>> from comptox_ai.db.graph_db import GraphDB
>>> db = GraphDB()
>>> db.create_graph_native_projection(name='example_graph', node_types=['ns0__Gene', 'ns0__StructuralEntity', 'ns0__Disease'])
>>> db.to_pytorch(graph_name='example_graph')

The to_pytorch() method should return a torch_geometric.data.Dataset object, as described on this page: https://pytorch-geometric.readthedocs.io/en/latest/notes/create_dataset.html

@JDRomano2 JDRomano2 added the enhancement New feature or request label May 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants