Skip to content
SR-Forge

Graph Entry

GraphEntry — the graph-data entry, built on torch_geometric.

Kept in its own module so that importing SR-Forge does not import torch_geometric (about 4 s, transformers included) for projects that never touch graph data. srforge.data.entry and srforge.data import this module on first use of the name GraphEntry; code that only needs to recognise one uses :func:srforge.data.entry.is_graph_entry, which never imports it.

GraphEntry

Stub for GraphEntry when torch-geometric is not installed.

This class exists so that isinstance(x, GraphEntry) checks work (always returning False) without requiring torch-geometric. Attempting to instantiate raises ImportError.