TypeDB-ML: A Ghost in the Machine Learning Machine
A once-active bridge between TypeDB knowledge graphs and PyTorch Geometric, now officially abandoned.

What it does
TypeDB-ML was a Python library that exported TypeDB knowledge graphs into formats usable by graph ML toolkits. It provided two main integrations: NetworkX for classical graph algorithms, and PyTorch Geometric for building Graph Neural Networks. The PyG path included a DataSet loader, feature encoders for typed data, and a worked link-prediction example.
The interesting bit
The library tried to solve a genuinely fiddly problem: TypeDB’s strongly-typed, heterogeneous data maps naturally to PyG’s HeteroData, but PyG’s own conversion loses node ordering. TypeDB-ML added store_concepts_by_type to keep concepts and predictions properly aligned — a small but thoughtful piece of plumbing.
Key highlights
- Lazy graph loading from TypeDB into PyG
Dataobjects FeatureEncoderwith built-in encoders for continuous and categorical typed data- NetworkX integration for algorithm libraries over exported graph queries
- Full link-prediction example in
examples/diagnosis - Bazel-based build and test system
Caveats
- Explicitly deprecated: README states “outdated and not supported” with planned closure by end of 2023
- Requires pinned dependency chain: Python 3.7+, TypeDB 2.11.1,
typedb-client-python2.11.x — versions now frozen in time - PyG installation noted as finicky even when actively maintained
Verdict Worth studying if you’re building similar graph-to-ML bridges and want to see how someone else handled type-aware heterogeneous conversion. Not worth installing unless you’re already maintaining a legacy TypeDB 2.11 deployment and need the specific example code.