Learn about Tabular Foundation Models such as TabPFN, how they differ from traditional ML models, as well as the new capabilities they unlock for AI agents
Jupyter Notebook
0
9 commits
updated Aug 20, 2026
| Participant notebook | workshop/tabpfn_workshop.ipynb — |
| Solutions | solutions/tabpfn_workshop_solutions.ipynb — |
During this workshop, you'll get an intro into the new era of tabular foundation models (TFMs), how they differ from traditional ML models, as well as the new capabilities they unlock for AI agents. We will start with a light intro into TFMs, how they operate and what their capabilities are. Following this, we will do some hands on exercises with TabPFN for regression, classification and interpretability, as well as some more advanced tasks like time-series predictions.
If you have ever prompted an LLM with a handful of examples and watched it pick up the pattern, you already know in-context learning. TabPFN applies the same idea to tables: you hand it labelled rows as context and it predicts new rows in a single forward pass — no gradient descent on your data, no hyperparameter search.
No prior knowledge of tabular foundation models is assumed. If you know
scikit-learn's fit() / predict() and have seen a few-shot prompt, you have
everything you need. We use TabPFN-3 through the Prior Labs API, so no GPU
required.
| Section | What happens | |
|---|---|---|
| 0 | Setup | API key, install, imports |
| In-context learning for tables | 50 rows of context, one forward pass, ~0.99 ROC AUC | |
| 1 | Classification | Malignant vs. benign, calibrated probabilities, the ICL scaling curve |
| 2 | Regression | Same two lines of code, but the answer is a number |
| 3 | Interpretability | SHAP beeswarm, per-patient waterfall, partial dependence |
| 4 | Forecasting | 24-month forecast in three lines, via TabPFN-TS |
| 5 | Advanced | Thinking mode: spend fit-time compute, optimise your own metric |
| Predictive agents | TabPFN as a tool an LLM agent can call (MCP) |
Datasets, all open — nothing to download by hand, nothing sensitive leaves your machine beyond what is already public:
statsmodels) — forecasting, section 4tabpfn-client) if you run locally.Section 0 of the notebook offers two ways to run TabPFN, and you pick one:
tabpfn
package — your data never leaves your machine, but you want a GPU for it to be quick,
and you have to accept the model licence on first use. Sections 1–4 work either way;
thinking mode in section 5 is API-only.workshop/tabpfn_workshop.ipynb (or the solutions notebook)Or just click the Colab badge at the top of this README. You do not need to clone the
repo in Colab: the notebook installs its own dependencies and every dataset is fetched
from scikit-learn, OpenML or statsmodels.
Run the following code:
git clone https://github.com/TuanaCelik/tabular-foundation-models-tabpfn-aug2026.git
cd tabular-foundation-models-tabpfn-aug2026
# create and activate venv, install dependencies
uv sync
uv sync installs everything, including the section 3 and 4 packages — which bring the
open-source tabpfn package and torch with them, so the first sync is a large download.
Picking the kernel. uv sync creates .venv/ in the repo, and ipykernel is
included, so it works as a notebook kernel directly:
.venv entry for this folder.uv run jupyter lab: it is already running inside the venv,
so the default Python 3 (ipykernel) kernel is the right one.uv run python -m ipykernel install --user --name tabpfn-workshop --display-name "TabPFN workshop"
pip install -r requirements.txt
The required Python version is set in pyproject.toml (requires-python = ">=3.10",
because that is what tabpfn-client needs). Add packages with uv add <package>.
requirements.txt is hand-maintained and deliberately unpinned, rather than
generated with uv export. A fully pinned export is ~290 lines and would force Colab to
reinstall numpy, pandas and friends mid-workshop, triggering a runtime restart. uv.lock
is still there for reproducible local installs.
The two notebooks. solutions/tabpfn_workshop_solutions.ipynb holds the complete
code; workshop/tabpfn_workshop.ipynb is the same notebook with the exercises blanked
out. In the solutions notebook, every answer sits inside a marked block:
# --- YOUR TURN ------------------------------------------------------------
# TODO: what the participant has to do
# --- SOLUTION ---
the answer
# --- END SOLUTION ---
and in the participant notebook those blocks are replaced by # your code here. If you
change one notebook, make the matching change in the other by hand — and clear the
outputs of the participant notebook before committing.
Notes for running it live:
fit_mode="fit_with_cache" so the
server reuses the encoded context, which is what keeps it to a couple of minutes rather
than much longer.tabpfn-extensions[interpretability], shap and tabpfn-time-series (needed by
sections 3 and 4 whichever backend you use), which brings torch along, so it takes a
minute or two. Get the room to run that cell first and talk over it: nobody then hits a
missing module mid-section, and any Colab restart prompt happens before you start.utm_source=workshop&utm_campaign=pyladies) on the Prior
Labs links — that is how this cohort is attributed.TuanaCelik/tabular-foundation-models-tabpfn-aug2026. If the
canonical repo ends up under pyladiesams, update the two URLs at the top of this
README and the badge inside each notebook's first cell.Re-watch this YouTube stream
This workshop was set up by @pyladiesams and @TuanaCelik
tabpfn-client (API) and
tabpfn (open source, runs on your own GPU)
— local + client backends, XGBoost/CatBoost baselines, SHAPTo ensure our code looks beautiful, PyLadies uses pre-commit hooks. You can enable them by
running pre-commit install. You may have to install pre-commit first, using uv sync,
uv pip install pre-commit or pip install pre-commit.
Happy Coding :)
5 commits
4 commits
Jupyter Notebook
100.0%
Learn about Tabular Foundation Models such as TabPFN, how they differ from traditional ML models, as well as the new capabilities they unlock for AI agents
Jupyter Notebook
0
9 commits
updated Aug 20, 2026
| Participant notebook | workshop/tabpfn_workshop.ipynb — |
| Solutions | solutions/tabpfn_workshop_solutions.ipynb — |
During this workshop, you'll get an intro into the new era of tabular foundation models (TFMs), how they differ from traditional ML models, as well as the new capabilities they unlock for AI agents. We will start with a light intro into TFMs, how they operate and what their capabilities are. Following this, we will do some hands on exercises with TabPFN for regression, classification and interpretability, as well as some more advanced tasks like time-series predictions.
If you have ever prompted an LLM with a handful of examples and watched it pick up the pattern, you already know in-context learning. TabPFN applies the same idea to tables: you hand it labelled rows as context and it predicts new rows in a single forward pass — no gradient descent on your data, no hyperparameter search.
No prior knowledge of tabular foundation models is assumed. If you know
scikit-learn's fit() / predict() and have seen a few-shot prompt, you have
everything you need. We use TabPFN-3 through the Prior Labs API, so no GPU
required.
| Section | What happens | |
|---|---|---|
| 0 | Setup | API key, install, imports |
| In-context learning for tables | 50 rows of context, one forward pass, ~0.99 ROC AUC | |
| 1 | Classification | Malignant vs. benign, calibrated probabilities, the ICL scaling curve |
| 2 | Regression | Same two lines of code, but the answer is a number |
| 3 | Interpretability | SHAP beeswarm, per-patient waterfall, partial dependence |
| 4 | Forecasting | 24-month forecast in three lines, via TabPFN-TS |
| 5 | Advanced | Thinking mode: spend fit-time compute, optimise your own metric |
| Predictive agents | TabPFN as a tool an LLM agent can call (MCP) |
Datasets, all open — nothing to download by hand, nothing sensitive leaves your machine beyond what is already public:
statsmodels) — forecasting, section 4tabpfn-client) if you run locally.Section 0 of the notebook offers two ways to run TabPFN, and you pick one:
tabpfn
package — your data never leaves your machine, but you want a GPU for it to be quick,
and you have to accept the model licence on first use. Sections 1–4 work either way;
thinking mode in section 5 is API-only.workshop/tabpfn_workshop.ipynb (or the solutions notebook)Or just click the Colab badge at the top of this README. You do not need to clone the
repo in Colab: the notebook installs its own dependencies and every dataset is fetched
from scikit-learn, OpenML or statsmodels.
Run the following code:
git clone https://github.com/TuanaCelik/tabular-foundation-models-tabpfn-aug2026.git
cd tabular-foundation-models-tabpfn-aug2026
# create and activate venv, install dependencies
uv sync
uv sync installs everything, including the section 3 and 4 packages — which bring the
open-source tabpfn package and torch with them, so the first sync is a large download.
Picking the kernel. uv sync creates .venv/ in the repo, and ipykernel is
included, so it works as a notebook kernel directly:
.venv entry for this folder.uv run jupyter lab: it is already running inside the venv,
so the default Python 3 (ipykernel) kernel is the right one.uv run python -m ipykernel install --user --name tabpfn-workshop --display-name "TabPFN workshop"
pip install -r requirements.txt
The required Python version is set in pyproject.toml (requires-python = ">=3.10",
because that is what tabpfn-client needs). Add packages with uv add <package>.
requirements.txt is hand-maintained and deliberately unpinned, rather than
generated with uv export. A fully pinned export is ~290 lines and would force Colab to
reinstall numpy, pandas and friends mid-workshop, triggering a runtime restart. uv.lock
is still there for reproducible local installs.
The two notebooks. solutions/tabpfn_workshop_solutions.ipynb holds the complete
code; workshop/tabpfn_workshop.ipynb is the same notebook with the exercises blanked
out. In the solutions notebook, every answer sits inside a marked block:
# --- YOUR TURN ------------------------------------------------------------
# TODO: what the participant has to do
# --- SOLUTION ---
the answer
# --- END SOLUTION ---
and in the participant notebook those blocks are replaced by # your code here. If you
change one notebook, make the matching change in the other by hand — and clear the
outputs of the participant notebook before committing.
Notes for running it live:
fit_mode="fit_with_cache" so the
server reuses the encoded context, which is what keeps it to a couple of minutes rather
than much longer.tabpfn-extensions[interpretability], shap and tabpfn-time-series (needed by
sections 3 and 4 whichever backend you use), which brings torch along, so it takes a
minute or two. Get the room to run that cell first and talk over it: nobody then hits a
missing module mid-section, and any Colab restart prompt happens before you start.utm_source=workshop&utm_campaign=pyladies) on the Prior
Labs links — that is how this cohort is attributed.TuanaCelik/tabular-foundation-models-tabpfn-aug2026. If the
canonical repo ends up under pyladiesams, update the two URLs at the top of this
README and the badge inside each notebook's first cell.Re-watch this YouTube stream
This workshop was set up by @pyladiesams and @TuanaCelik
tabpfn-client (API) and
tabpfn (open source, runs on your own GPU)
— local + client backends, XGBoost/CatBoost baselines, SHAPTo ensure our code looks beautiful, PyLadies uses pre-commit hooks. You can enable them by
running pre-commit install. You may have to install pre-commit first, using uv sync,
uv pip install pre-commit or pip install pre-commit.
Happy Coding :)
5 commits
4 commits
Jupyter Notebook
100.0%