> ## Documentation Index
> Fetch the complete documentation index at: https://docs.priorlabs.ai/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> TabPFN-3 and later versions support up to 1,000,000 rows, subject to feature count and checkpoint/API limits.
> For large datasets, use per-estimator subsampling, e.g. inference_config={"SUBSAMPLE_SAMPLES": 100_000}, in TabPFNClassifier or TabPFNRegressor from tabpfn or tabpfn_client.
> Pass raw pandas DataFrames to fit and predict. Categorical strings/categories, raw text, and missing feature values are handled automatically; no manual integer/one-hot encoding, imputation, scaling, or outlier removal is needed.

# TabPFNRel

> TabPFNRel for TabPFN-Rel.

> [!NOTE]
>
> Looking for usage documentation? Check out [Relational predictions](https://docs.priorlabs.ai/capabilities/relational.md).

## `TabPFNRel`

[ View source ](https://github.com/PriorLabs/tabpfn-rel/blob/9f807dc40be79634916f75d80f7b15b7993766af/src/tabpfn_rel/estimator.py#L13)

Fit a relational context with local or hosted TabPFN inference.

Select the inference backend.

```python theme={null}
TabPFNRel(
    *,
    model: Literal["client", "local", "local-2026-08-15", "client-2026-08-15", "client-2026-09-18", "client-2026-09-28", "local-2026-09-28"],
)
```

**Parameters**

| Parameter | Type | Default | Description |
| - | - | - | - |
| `model` | `Literal["client", "local", "local-2026-08-15", "client-2026-08-15", "client-2026-09-18", "client-2026-09-28", "local-2026-09-28"]` | Required | `"client"` (hosted API) or `"local"` for the latest recipe; a dated selector such as `"client-2026-09-28"` pins one. |

***

## `TabPFNRel.trials`

[ View source ](https://github.com/PriorLabs/tabpfn-rel/blob/9f807dc40be79634916f75d80f7b15b7993766af/src/tabpfn_rel/estimator.py#L57)

Return tuning results, or `None` when no tuning has completed.

**Returns**

| Type | Description |
| - | - |
| `list[TrialResult] \| None` | — |

***

## `TabPFNRel.config`

[ View source ](https://github.com/PriorLabs/tabpfn-rel/blob/9f807dc40be79634916f75d80f7b15b7993766af/src/tabpfn_rel/estimator.py#L62)

Return the fitted configuration, or `None` before a successful fit.

**Returns**

| Type | Description |
| - | - |
| `dict[str, Any] \| None` | — |

***

## `TabPFNRel.fit`

[ View source ](https://github.com/PriorLabs/tabpfn-rel/blob/9f807dc40be79634916f75d80f7b15b7993766af/src/tabpfn_rel/estimator.py#L66)

Fit a model on the context and return self.

```python theme={null}
TabPFNRel.fit(
    context: PredictiveContext,
    *,
    n_trials: int = 0,
    seed: int = 0,
    cache_dir: str | Path | None = None,
) -> TabPFNRel
```

**Parameters**

| Parameter | Type | Default | Description |
| - | - | - | - |
| `context` | `PredictiveContext` | Required | The database and training task. |
| `n_trials` | `int` | `0` | Tuning trials; `0` fits the default configuration. Hosted trials use API quota. |
| `seed` | `int` | `0` | Random seed for tuning and fitting. |
| `cache_dir` | `str \| Path \| None` | `None` | Directory for cached DFS features, reused by [`predict`](https://docs.priorlabs.ai/api-reference/python/tabpfn-rel/estimator#tabpfnrel-predict). |

**Returns**

| Type | Description |
| - | - |
| `TabPFNRel` | — |

***

## `TabPFNRel.predict`

[ View source ](https://github.com/PriorLabs/tabpfn-rel/blob/9f807dc40be79634916f75d80f7b15b7993766af/src/tabpfn_rel/estimator.py#L89)

Predict the query's entities and timestamp using the fitted context.

```python theme={null}
TabPFNRel.predict(
    query: PredictiveQuery,
    *,
    cache_dir: str | Path | None = None,
) -> pd.DataFrame
```

**Parameters**

| Parameter | Type | Default | Description |
| - | - | - | - |
| `query` | `PredictiveQuery` | Required | The entities and anchor timestamp to predict. |
| `cache_dir` | `str \| Path \| None` | `None` | Feature cache; `None` reuses the one passed to [`fit`](https://docs.priorlabs.ai/api-reference/python/tabpfn-rel/estimator#tabpfnrel-fit). |

**Returns**

| Type | Description |
| - | - |
| `pd.DataFrame` | One row per entity: the time and entity columns and `<target_col>_pred`. |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.