This directory contains the training and evaluation stage for RDB_PFN. It includes:
- Hydra configs for training and evaluation
- model implementation and training loops
- evaluation code for RDB_PFN and baseline models
- local directories for checkpoints and datasets
- src/train.py: main pretraining entry point.
- src/eval.py: main evaluation entry point.
- conf_train/RDBPFN_single.yaml: single-table pretraining config.
- conf_train/RDBPFN.yaml: final RDB foundation model pretraining config.
- conf_eval/dataset: dataset presets for evaluation.
- conf_eval/model: model presets for RDB_PFN and baselines.
This stage has a dependency manifest at pyproject.toml.
Recommended installation order:
- Install a
torchbuild that matches your machine. - Install the default dependencies in
model_pretrain/. - Optionally install the extra baseline dependencies.
The default dependency set includes:
- PyTorch
- Hydra
- Accelerate
schedulefree- NumPy and scikit-learn
- AutoGluon
The optional extra all-baselines additionally installs:
- TabPFN
- TabICL
Example commands after installing the correct Torch build:
pip install -e model_pretrain
pip install -e model_pretrain[all-baselines]Torch note:
pyproject.tomlintentionally does not install PyTorch automatically.- Users should install Torch manually so they can choose the correct CPU or CUDA build for their platform.
- This avoids mismatches between the installed Torch wheel and the user GPU environment.
LimiX note:
- LimiX is intentionally not included in
pyproject.toml. - If you want to evaluate the LimiX baselines, create a separate environment and follow the guidelines in LimiX.
The pretraining pipeline is partially adapted from the nanoTabPFN project. We gratefully acknowledge their work.
Expected under model_pretrain/pretrain_datasets/.
Current training configs reference:
- synthetic single-table
.h5priors - synthetic RDB-derived
.h5priors
Expected under model_pretrain/datasets/ for single-table evaluation or model_pretrain/rdb_datasets/ for RDB evaluation.
Checkpoints are expected under model_pretrain/checkpoints/.
Two repository-known checkpoint paths are already referenced by configs:
checkpoints/RDBPFN_single/checkpoints/RDBPFN/
All pretrain required datasets, and evaluation required datasets are provided at Huggingface. You can download them and use them directly for pretraining and evaluation.
Evaluation is Hydra-based and starts from src/eval.py for RDB and src/eval_csv.py for single-table.
From the repository root:
cd model_pretrain
python -m src.eval dataset=full-1024 model=RDBPFNThis uses:
- the existing dataset preset
conf_eval/dataset/full-1024.yaml - the model preset
conf_eval/model/RDBPFN.yaml
python -m src.eval dataset=full-512 model=RDBPFN_singleYou can swap model= to other provided presets such as:
-
RDBPFN -
RDBPFN_single -
xgboost -
random_forest -
autogluon-medium -
tabpfnv25 -
tabpfnv25_lite -
tabpfnv2 -
tabiclv11 -
tabiclv11_lite -
tabiclv1 -
autogluon-mitra -
limix16m -
limix16m_lite -
limix2m
cd model_pretrain
python -m src.eval_csv model=RDBPFN dataset=clf_npzTraining is Hydra-based and starts from src/train.py.
The single-table config is conf_train/RDBPFN_single.yaml.
Example:
cd model_pretrain
python -m accelerate.commands.launch --num_processes 1 -m src.train --config-name RDBPFN_singleThis stage trains from single-table priors and saves into checkpoints/RDBPFN_single/.
The full RDB config is conf_train/RDBPFN.yaml.
Example:
python -m accelerate.commands.launch --multi_gpu --num_processes 8 -m src.train --config-name RDBPFNThis config currently mixes multiple RDB-derived and single-table-derived .h5 datasets and initializes from checkpoints/RDBPFN_single/.
- The training is parallelized across multiple GPUs using
accelerate. - We found that training results can vary slightly across machines, so we also provide the final trained model checkpoints.
- If
wandb.enabled=true,WANDB_API_KEYmust be set in the environment.