Skip to main content

CTU Relational: SQL Database Datasets for Machine Learning

Project description

CTU Relational

website PyPI version License: MIT

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ctu_relational-0.3.0.tar.gz (33.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ctu_relational-0.3.0-py3-none-any.whl (39.5 kB view details)

Uploaded Python 3

File details

Details for the file ctu_relational-0.3.0.tar.gz.

File metadata

  • Download URL: ctu_relational-0.3.0.tar.gz
  • Upload date:
  • Size: 33.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for ctu_relational-0.3.0.tar.gz
Algorithm Hash digest
SHA256 6b9a18e091c176acdfb2a6c277c99828d7541a93949ce1edbd40e5c8fe88f013
MD5 cf4e63f587a0e7f891f2b3361f8b6531
BLAKE2b-256 2b21667d50951e139590ef87ea0480d7f971c8332a3808e5dcefd33126a50ebc

See more details on using hashes here.

Provenance

The following attestation bundles were made for ctu_relational-0.3.0.tar.gz:

Publisher: publish-to-pypi.yml on jakubpeleska/ctu-relational-py

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file ctu_relational-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: ctu_relational-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 39.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for ctu_relational-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 82df35d9d531f29ab000e7567b26b9245fbb045f771cdd91d62c12a68fa6dea9
MD5 3024b4772eb8054b023d065e7d6fa42c
BLAKE2b-256 54ac5d64fe011e8b4bef428cae1ee9fcb80ab58ca3fa98e793cc8a125b28e2f8

See more details on using hashes here.

Provenance

The following attestation bundles were made for ctu_relational-0.3.0-py3-none-any.whl:

Publisher: publish-to-pypi.yml on jakubpeleska/ctu-relational-py

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page