TabPFN-Rel
TabPFN-Rel predicts entity outcomes from relational tables. It builds deep feature synthesis (DFS) features, adds optional calendar, history and text features, and fits TabPFN using random or recency-weighted contexts.
This package contains the model and its search spaces. RelArena Core supplies the relational data contracts, feature cache, tuning and predictive interface.
Install
Requires Python 3.11 or 3.12. Choose a backend:
pip install "tabpfn-rel[local]" # local TabPFN; GPU recommended
pip install "tabpfn-rel[api]" # hosted TabPFN; requires API authentication
Base tabpfn-rel installs the model code and RelArena Core. The RelArena benchmark
package is optional. An inference extra supplies
the DFS engine and the selected estimator backend. Backend authentication and model
access follow TabPFN or tabpfn-client's own setup instructions.
Try the generated database example from the monorepo root:
uv run --package tabpfn-rel --extra local python packages/tabpfn-rel/examples/tiny_database.py
It creates four customers and their event history, fits the default configuration, and prints one prediction per customer.
Predict on your database
Define the database relationships and prediction task in YAML, following RelArena's predictive interface. Then:
from tabpfn_rel import PredictiveQuery, PredictiveQuerySpec
spec = PredictiveQuerySpec.from_yaml("task.yaml", data_dir="data")
query = PredictiveQuery(spec).fit("tabpfn-rel-local", n_trials=0)
predictions = query.predict()
Use tabpfn-rel-client for the hosted backend. n_trials=0 fits the default
configuration once; a positive budget enables the shared temporal tuning protocol.
API fits and predictions consume service quota. The predictive classes are the
same classes exported by relarena_core.userdb and, when installed,
relarena.userdb.
Benchmark with RelArena
pip install "relarena[tabpfn-rel-local]"
relarena --model tabpfn-rel-local --datasets rel-f1 --tasks driver-dnf --n-trials 1
For this fixed-grid model, the CLI uses --n-trials 1 for the default configuration.
Larger budgets also evaluate deeper DFS configurations. Unlike RPI, a zero CLI
budget evaluates no grid configurations.
relarena[tabpfn-rel-api] installs the hosted backend, selected with
--model tabpfn-rel-client.
The CLI and predictive interface discover installed models automatically. Direct registry users call discovery explicitly:
from relarena_core import discover_models, registry
discover_models()
model_class = registry.get("tabpfn-rel-local")
space = registry.search_space("tabpfn-rel-local")
For a custom training loop, import TabPFNRelLocalModel, TabPFNRelClientModel,
and their TABPFN_REL_LOCAL_SPACE / TABPFN_REL_CLIENT_SPACE directly from
tabpfn_rel. They implement RelArena's fit / predict model contract.
Importing tabpfn_rel or relarena_core does not discover plugins or load
estimator backends.
Development
TabPFN-Rel is an independently installable distribution developed alongside
relarena-core and relarena in the RelArena monorepo. Its runtime dependencies
contain core and the selected backend; it does not require the benchmark package.
Each member has its own package metadata, source tree and tests. The repository
root owns the shared development lockfile, lint configuration and CI.
Run from the repository root:
uv sync --locked --all-packages
OMP_NUM_THREADS=1 uv run --no-sync pytest
uv run --no-sync pre-commit run --all-files
uv build --package tabpfn-rel
The workspace source overrides resolve local members. Published wheel metadata contains ordinary version requirements. The candidate distributions must be released before the index-only installation commands above are available.
The tests exercise feature and context behavior without downloading model weights or making hosted API requests. Integration tests use real DFS and a small test estimator to cover the predictive interface and temporal tuning.
Release files for tabpfn-rel 0.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| tabpfn_rel-0.0.1.tar.gz | 17.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| tabpfn_rel-0.0.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 38.6 kB
Release files / tabpfn_rel-0.0.1.tar.gz
| Download URL | tabpfn_rel-0.0.1.tar.gz |
|---|---|
| Size | 17.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
746e06cdb1f7a89b38404f0d31fd604e8d1c683ebad379d7cd3979de6d9b35d6
|
|
BLAKE2b-256 checksum How to use checksums |
4618178d4c15df83781f09b93c944adbd0dfbb5a10ae6bc1736ac1554002ab53
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.7 {"installer":{"name":"uv","version":"0.11.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / tabpfn_rel-0.0.1-py3-none-any.whl
| Download URL | tabpfn_rel-0.0.1-py3-none-any.whl |
|---|---|
| Size | 20.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3c7dc777268c7e336cd2ee1bdb5480602c6de8cd2ca68488fcc14686cf2587ad
|
|
BLAKE2b-256 checksum How to use checksums |
0b38c26fd37d4584122c6e1a1ee4fa9104dad63b959b127fe37efc97ea3a151c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.7 {"installer":{"name":"uv","version":"0.11.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|