Practical overview
When it fits
Use PyKEEN when you want a Python-based workflow to train and assess knowledge graph embedding models, from its documented TransE and Nations example to experiments using custom triples.
Who it is for
- Researchers and practitioners building knowledge graph embedding experiments.
- Python users who need to train and evaluate link-prediction or knowledge graph completion models.
- Teams adapting embedding experiments to domain-specific graph data.
Documented uses
- Train an embedding model on a built-in or custom knowledge graph dataset.
- Evaluate a model using PyKEEN’s training and evaluation workflow.
- Compare models through shared package APIs and repeatable experiments.
- Explore embedding approaches that incorporate multimodal information.
Requirements & limits
The package is open source under the MIT license. The repository states that its latest stable version requires Python 3.11 or later and can be installed through PyPI or from GitHub.
- PyKEEN is a library that runs in a Python environment, not a hosted modeling interface.
- The documented installation requirement is Python 3.11 or later for the latest stable version.
- The quickstart returns model, training-loop and evaluation information in a PipelineResult object.
- Custom graph data can be supplied through user-generated triples factories; the repository links to a dedicated data tutorial.
Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.
Train and evaluate TransE on the Nations dataset
Use PyKEEN’s pipeline to train a TransE knowledge graph embedding model and save its results.
Before you start
- PyKEEN installed in a Python environment.
Steps
Import
pipelinefrompykeen.pipeline.Call
pipeline(dataset='Nations', model='TransE').Save the returned result with
pipeline_result.save_to_directory('nations_transe').
Expected outcome
The pipeline returns a `PipelineResult` with the trained model, training loop, and evaluation; the example saves results to the `nations_transe` directory.
Guide limitations
- The example uses the Nations dataset and TransE model.
- The default training approach is sLCWA and the default evaluation is rank-based.
- Do not pass
negative_samplerwhen using the LCWA training approach.
Sources & review
Source record details
- Source availability
- Active
- Sources checked
- 11 October 2026
- Original website title
- pykeen/pykeen · Official homepage title · retained in its source language

