Metadata-Version: 2.4
Name: dbinfer-relbench-adapter
Version: 0.1.3
Summary: Adapter to bridge DBInfer datasets and tasks to the RelBench interface with caching support
Author-email: Vijay Prakash Dwivedi <hi@vijaydwivedi.com.np>
Maintainer-email: Vijay Prakash Dwivedi <hi@vijaydwivedi.com.np>
License: MIT
Project-URL: Homepage, https://github.com/vijaydwivedi75/dbinfer-relbench
Project-URL: Repository, https://github.com/vijaydwivedi75/dbinfer-relbench
Project-URL: Bug Tracker, https://github.com/vijaydwivedi75/dbinfer-relbench/issues
Keywords: dbinfer,relbench,adapter,relational,database,benchmark
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Science/Research
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Classifier: Topic :: Database
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: dbinfer_bench
Requires-Dist: relbench
Requires-Dist: pandas>=1.3.0
Requires-Dist: numpy>=1.20.0
Requires-Dist: scikit-learn>=0.24.0
Requires-Dist: torch==2.3.0
Requires-Dist: torchvision
Requires-Dist: torchaudio
Requires-Dist: torchdata==0.9.0
Provides-Extra: dev
Requires-Dist: pytest>=7.0.0; extra == "dev"
Requires-Dist: pytest-cov>=3.0.0; extra == "dev"
Requires-Dist: black>=22.0.0; extra == "dev"
Requires-Dist: isort>=5.10.0; extra == "dev"
Requires-Dist: flake8>=4.0.0; extra == "dev"
Requires-Dist: mypy>=0.950; extra == "dev"
Dynamic: license-file

# DBInfer-RelBench Adapter

Adapter to use [DBInfer datasets](https://github.com/awslabs/multi-table-benchmark) with the RelBench interface.

## Installation

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

## Example

```python
from dbinfer_relbench_adapter import load_dbinfer_data

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


# This interface is compatible with RelBench.
# Example usage (full dataset and task list below)

dataset = 'diginetica'
task = 'ctr'
```

```diff
- dataset: Dataset = get_dataset(dataset, download=True) # for relbench data
- task: EntityTask = get_task(dataset, task, download=True) # for relbench task
+ dataset, task = load_dbinfer_data(dataset, task) # use this line instead
```

## Full list of supported datasets and tasks

See the full list of datasets and their data card in the accompanying paper.

| Dataset name  | Task names                          |
|:-------------:|:------------------------------------|
|`avs`          |`repeater`                           |
|`mag`          |`cite`, `venue`                      |
|`diginetica`   |`ctr`, `purchase`                    |
|`retailrocket` |`cvr`                                |
|`seznam`       |`charge`, `prepay`                   |
|`amazon`       |`rating`, `purchase`, `churn`        |
|`stackexchange`|`churn`, `upvote`                    |
|`outbrain-small`     |`ctr`                                |

```
@article{dbinfer,
  title={4DBInfer: A 4D Benchmarking Toolbox for Graph-Centric Predictive Modeling on Relational DBs},
  author={Wang, Minjie and Gan, Quan and Wipf, David and Cai, Zhenkun and Li, Ning and Tang, Jianheng and Zhang, Yanlin and Zhang, Zizhao and Mao, Zunyao and Song, Yakun and Wang, Yanbo and Li, Jiahang and Zhang, Han and Yang, Guang and Qin, Xiao and Lei, Chuan and Zhang, Muhan and Zhang, Weinan and Faloutsos, Christos and Zhang, Zheng},
  journal={arXiv preprint arXiv:2404.18209},
  year={2024}
}
```

## License

MIT

## Acknowledgements

This adapter package was made possible thanks to [Yangyi Shen](https://www.linkedin.com/in/yangyi-shen-232514264/) and [Claude Code](https://www.claude.ai/).
