CTU Relational
The CTU Prague Relational Learning Repository was originally published in 2015 with a goal to support machine learning research with multi-relational data. Today, the repository is hosted on https://relational.fel.cvut.cz and contains more than 80 different datasets stored in SQL databases.
The RelBench project is currently seeking a similar goal of establishing the Relational Deep Learning as a new subfield of deep learning. The goal of this library is to support the effort of RelBench team by providing the CTU Relational datasets in the standardized representation. As such, the library is an extension of the RelBench package.
Installation
You can install CTU Relational package through pip:
pip install ctu-relational
Contents
:warning: The package is currenly in the development and contain only a subset of all available datasets. Rest will be added in the near future together with asociated tasks.
You can load datasets in same way as in the RelBench, e.g.:
from relbench.datasets import get_dataset
import ctu_relational
dataset = get_dataset('ctu-seznam') # automatically cached through the relbench package
db = dataset.get_db()
or directly from CTU Relational:
from ctu_relational import datasets as ctu_datasets
dataset = ctu_datasets.Seznam() # custom cache directory should be specified
db = dataset.get_db()
As opposed to the RelBench package, CTU Relational works directly with relational databases through the SQLAlchemy package. DBDataset class provides a way of loading an SQL database in the RelBench format. You can load data from your SQL server with the following snippet.
from ctu_relational.datasets import DBDataset
custom_dataset = DBDataset(
dialect="mariadb", # other dialects should be supported but weren't tested
driver="mysqlconnector",
user=<user>,
password=<password>,
host=<host_url>,
port=3306,
database=<database_name>
)
db = custom_dataset.get_db(upto_test_timestamp=False)
Although, directly loaded databases usually need some additional touches. Take a look at ctu_datasets.py for examples.
Development
Install uv
- macOS & Linux
wget -qO- https://astral.sh/uv/install.sh | sh
- windows
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
More info https://docs.astral.sh/uv/getting-started/installation/
Install dependencies
uv sync --extra cpu
or
uv sync --extra cu124
for CUDA support.
Enable pre-commit
uv run pre-commit install
Run pre-commit
uv run pre-commit run
Metadata
Release files for ctu-relational 0.4.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| ctu_relational-0.4.0.tar.gz | 40.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| ctu_relational-0.4.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 85.7 kB
Release files / ctu_relational-0.4.0.tar.gz
| Download URL | ctu_relational-0.4.0.tar.gz |
|---|---|
| Size | 40.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
079ef858d745b27f54dbf0f950b25e30518946af36f24010c16628e35aa7ec5f
|
|
BLAKE2b-256 checksum How to use checksums |
7b30ec102081972f82b499825284fdd674d8e290218b2f0f6e3ef00d5a119d6a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Mar 28, 2025.
Transparency logRelease files / ctu_relational-0.4.0-py3-none-any.whl
| Download URL | ctu_relational-0.4.0-py3-none-any.whl |
|---|---|
| Size | 45.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
69e882c5c19b83cd55d79b2754808fddfc9a38c07592a20386201ccff8643edd
|
|
BLAKE2b-256 checksum How to use checksums |
e5b843be004e2c0b0101cea9e31ffb3b378f93dcd1b9720b60dbda05afd7e7ad
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Mar 28, 2025.
Transparency log