Skip to main content

Adapter to bridge DBInfer datasets and tasks to the RelBench interface with caching support

Project description

DBInfer-RelBench Adapter

Adapter to use DBInfer datasets with the RelBench interface.

Installation

pip install dbinfer-relbench-adapter
pip install dgl -f https://data.dgl.ai/wheels/torch-2.3/repo.html

Example

from dbinfer_relbench_adapter import load_dbinfer_data

# Load dataset and task
dataset, task = load_dbinfer_data("diginetica", "ctr")

# Access database tables
db = dataset.get_db()
for table_name, table in db.table_dict.items():
    print(f"{table_name}: {len(table)} rows")

# Get train/val/test splits
train_table = task.get_table("train")
val_table = task.get_table("val")
test_table = task.get_table("test")

# Evaluate predictions
predictions = model.predict(test_table)
results = task.evaluate(predictions, test_table)

License

MIT

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

dbinfer_relbench_adapter-0.1.2.tar.gz (12.8 kB view details)

Uploaded Source

Built Distribution

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

dbinfer_relbench_adapter-0.1.2-py3-none-any.whl (9.7 kB view details)

Uploaded Python 3

File details

Details for the file dbinfer_relbench_adapter-0.1.2.tar.gz.

File metadata

File hashes

Hashes for dbinfer_relbench_adapter-0.1.2.tar.gz
Algorithm Hash digest
SHA256 e1c5278e5ad8a252fc37a7e810d544985b0c897522798375e687636608d994ff
MD5 ef8cd536a16abbbacae6e75860c11728
BLAKE2b-256 81c1b81d8e655017cd5af213fd6b22f2b3877767eb671c12db0b88934daa372d

See more details on using hashes here.

File details

Details for the file dbinfer_relbench_adapter-0.1.2-py3-none-any.whl.

File metadata

File hashes

Hashes for dbinfer_relbench_adapter-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 758ca1a0ee0d4cc4941781c381eaeb099c8ad74da7f335aee0444364e239fedb
MD5 7a949f8614e3c0953860cc5764fe3a3f
BLAKE2b-256 09a03352f9180fe4659947251f326e48ad3c22ad820a1ba663728189af4756c9

See more details on using hashes here.

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