> ## 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.

# SageMaker

> Use the SageMaker deployment adapters.

> [!NOTE]
>
> Looking for usage documentation? Check out [Classification](https://docs.priorlabs.ai/capabilities/classification.md), [Regression](https://docs.priorlabs.ai/capabilities/regression.md) and [KV cache](https://docs.priorlabs.ai/capabilities/kv-cache.md).

## `sagemaker.TabPFNClassifier`

[ View source ](https://github.com/PriorLabs/tabpfn-client/blob/ce678cec44dc715f4d835a44990a8f5f115b7acc/src/tabpfn_client/sagemaker/estimator.py#L353)

TabPFN classifier backed by a SageMaker real-time endpoint.

```python theme={null}
sagemaker.TabPFNClassifier(
    endpoint_name: str,
    region_name: Optional[str] = None,
    boto_session: Optional[Any] = None,
    model_path: str = "auto",
    n_estimators: int = 8,
    softmax_temperature: float = 0.9,
    balance_probabilities: bool = False,
    average_before_softmax: bool = False,
    ignore_pretraining_limits: bool = True,
    inference_precision: Literal["autocast", "auto"] = "auto",
    random_state: Optional[int] = 0,
    inference_config: Optional[Dict[str, Any]] = None,
    paper_version: bool = False,
    thinking_mode: bool = False,
    thinking_effort: Optional[ThinkingEffort] = None,
    thinking_timeout_s: Optional[float] = None,
    thinking_metric: Optional[str] = None,
    use_kv_cache: bool = False,
    use_async: bool = False,
    s3_bucket: Optional[str] = None,
    s3_prefix: str = "async-io",
    async_poll_interval_s: float = 2.0,
    async_timeout_s: float = 60 * 60,
    invocation_timeout_s: Optional[int] = None,
)
```

**Parameters**

| Parameter | Type | Default | Description |
| - | - | - | - |
| `endpoint_name` | `str` | Required | — |
| `region_name` | `Optional[str]` | `None` | — |
| `boto_session` | `Optional[Any]` | `None` | — |
| `model_path` | `str` | `"auto"` | — |
| `n_estimators` | `int` | `8` | — |
| `softmax_temperature` | `float` | `0.9` | — |
| `balance_probabilities` | `bool` | `False` | — |
| `average_before_softmax` | `bool` | `False` | — |
| `ignore_pretraining_limits` | `bool` | `True` | — |
| `inference_precision` | `Literal["autocast", "auto"]` | `"auto"` | — |
| `random_state` | `Optional[int]` | `0` | — |
| `inference_config` | `Optional[Dict[str, Any]]` [`InferenceConfig` options](https://docs.priorlabs.ai/api-reference/python/tabpfn/inference-config#inferenceconfig) | `None` | — |
| `paper_version` | `bool` | `False` | — |
| `thinking_mode` | `bool` | `False` | — |
| `thinking_effort` | `Optional[ThinkingEffort]` | `None` | — |
| `thinking_timeout_s` | `Optional[float]` | `None` | — |
| `thinking_metric` | `Optional[str]` | `None` | — |
| `use_kv_cache` | `bool` | `False` | — |
| `use_async` | `bool` | `False` | — |
| `s3_bucket` | `Optional[str]` | `None` | — |
| `s3_prefix` | `str` | `"async-io"` | — |
| `async_poll_interval_s` | `float` | `2.0` | — |
| `async_timeout_s` | `float` | `60 * 60` | — |
| `invocation_timeout_s` | `Optional[int]` | `None` | — |

**Example**

```python theme={null}
from tabpfn_client.sagemaker import TabPFNClassifier
clf = TabPFNClassifier(
    endpoint_name="tabpfn-sm-alpha-v3-thinking-001",
    region_name="us-east-1",
)
clf.fit(X_train, y_train)
clf.predict(X_test)
clf.predict_proba(X_test)
```

***

## `sagemaker.TabPFNClassifier.fit`

[ View source ](https://github.com/PriorLabs/tabpfn-client/blob/ce678cec44dc715f4d835a44990a8f5f115b7acc/src/tabpfn_client/sagemaker/estimator.py#L196)

Store the training data; the endpoint fits on the next `predict*` call.

```python theme={null}
sagemaker.TabPFNClassifier.fit(
    X: Any,
    y: Any,
) -> "_SagemakerBase"
```

**Parameters**

| Parameter | Type | Default | Description |
| - | - | - | - |
| `X` | `Any` | Required | Training features. |
| `y` | `Any` | Required | Training targets. |

**Returns**

| Type | Description |
| - | - |
| `_SagemakerBase` | The estimator itself. |

**Raises**

`ValueError`

If `X` and `y` have different numbers of samples, or
thinking mode is on and `y` has only one class.

***

## `sagemaker.TabPFNClassifier.predict`

[ View source ](https://github.com/PriorLabs/tabpfn-client/blob/ce678cec44dc715f4d835a44990a8f5f115b7acc/src/tabpfn_client/sagemaker/estimator.py#L369)

Predict class labels for `X`.

```python theme={null}
sagemaker.TabPFNClassifier.predict(
    X: Any,
) -> np.ndarray
```

**Parameters**

| Parameter | Type | Default | Description |
| - | - | - | - |
| `X` | `Any` | Required | — |

**Returns**

| Type | Description |
| - | - |
| `np.ndarray` | — |

***

## `sagemaker.TabPFNClassifier.predict_proba`

[ View source ](https://github.com/PriorLabs/tabpfn-client/blob/ce678cec44dc715f4d835a44990a8f5f115b7acc/src/tabpfn_client/sagemaker/estimator.py#L374)

Predict class probabilities for `X`.

```python theme={null}
sagemaker.TabPFNClassifier.predict_proba(
    X: Any,
) -> np.ndarray
```

**Parameters**

| Parameter | Type | Default | Description |
| - | - | - | - |
| `X` | `Any` | Required | — |

**Returns**

| Type | Description |
| - | - |
| `np.ndarray` | — |

***

## `sagemaker.TabPFNRegressor`

[ View source ](https://github.com/PriorLabs/tabpfn-client/blob/ce678cec44dc715f4d835a44990a8f5f115b7acc/src/tabpfn_client/sagemaker/estimator.py#L380)

TabPFN regressor backed by a SageMaker endpoint.

```python theme={null}
sagemaker.TabPFNRegressor(
    endpoint_name: str,
    region_name: Optional[str] = None,
    boto_session: Optional[Any] = None,
    model_path: str = "auto",
    n_estimators: int = 8,
    softmax_temperature: float = 0.9,
    balance_probabilities: bool = False,
    average_before_softmax: bool = False,
    ignore_pretraining_limits: bool = True,
    inference_precision: Literal["autocast", "auto"] = "auto",
    random_state: Optional[int] = 0,
    inference_config: Optional[Dict[str, Any]] = None,
    paper_version: bool = False,
    thinking_mode: bool = False,
    thinking_effort: Optional[ThinkingEffort] = None,
    thinking_timeout_s: Optional[float] = None,
    thinking_metric: Optional[str] = None,
    use_kv_cache: bool = False,
    use_async: bool = False,
    s3_bucket: Optional[str] = None,
    s3_prefix: str = "async-io",
    async_poll_interval_s: float = 2.0,
    async_timeout_s: float = 60 * 60,
    invocation_timeout_s: Optional[int] = None,
)
```

**Parameters**

| Parameter | Type | Default | Description |
| - | - | - | - |
| `endpoint_name` | `str` | Required | — |
| `region_name` | `Optional[str]` | `None` | — |
| `boto_session` | `Optional[Any]` | `None` | — |
| `model_path` | `str` | `"auto"` | — |
| `n_estimators` | `int` | `8` | — |
| `softmax_temperature` | `float` | `0.9` | — |
| `balance_probabilities` | `bool` | `False` | — |
| `average_before_softmax` | `bool` | `False` | — |
| `ignore_pretraining_limits` | `bool` | `True` | — |
| `inference_precision` | `Literal["autocast", "auto"]` | `"auto"` | — |
| `random_state` | `Optional[int]` | `0` | — |
| `inference_config` | `Optional[Dict[str, Any]]` [`InferenceConfig` options](https://docs.priorlabs.ai/api-reference/python/tabpfn/inference-config#inferenceconfig) | `None` | — |
| `paper_version` | `bool` | `False` | — |
| `thinking_mode` | `bool` | `False` | — |
| `thinking_effort` | `Optional[ThinkingEffort]` | `None` | — |
| `thinking_timeout_s` | `Optional[float]` | `None` | — |
| `thinking_metric` | `Optional[str]` | `None` | — |
| `use_kv_cache` | `bool` | `False` | — |
| `use_async` | `bool` | `False` | — |
| `s3_bucket` | `Optional[str]` | `None` | — |
| `s3_prefix` | `str` | `"async-io"` | — |
| `async_poll_interval_s` | `float` | `2.0` | — |
| `async_timeout_s` | `float` | `60 * 60` | — |
| `invocation_timeout_s` | `Optional[int]` | `None` | — |

***

## `sagemaker.TabPFNRegressor.fit`

[ View source ](https://github.com/PriorLabs/tabpfn-client/blob/ce678cec44dc715f4d835a44990a8f5f115b7acc/src/tabpfn_client/sagemaker/estimator.py#L196)

Store the training data; the endpoint fits on the next `predict*` call.

```python theme={null}
sagemaker.TabPFNRegressor.fit(
    X: Any,
    y: Any,
) -> "_SagemakerBase"
```

**Parameters**

| Parameter | Type | Default | Description |
| - | - | - | - |
| `X` | `Any` | Required | Training features. |
| `y` | `Any` | Required | Training targets. |

**Returns**

| Type | Description |
| - | - |
| `_SagemakerBase` | The estimator itself. |

**Raises**

`ValueError`

If `X` and `y` have different numbers of samples, or
thinking mode is on and `y` has only one class.

***

## `sagemaker.TabPFNRegressor.predict`

[ View source ](https://github.com/PriorLabs/tabpfn-client/blob/ce678cec44dc715f4d835a44990a8f5f115b7acc/src/tabpfn_client/sagemaker/estimator.py#L385)

Predict regression targets for `X`.

```python theme={null}
sagemaker.TabPFNRegressor.predict(
    X: Any,
    output_type: str = "mean",
    quantiles: Optional[list] = None,
) -> np.ndarray
```

**Parameters**

| Parameter | Type | Default | Description |
| - | - | - | - |
| `X` | `Any` | Required | Test features. |
| `output_type` | `str` | `"mean"` | Which prediction to return, e.g. "mean", "median" or "quantiles". |
| `quantiles` | `Optional[list]` | `None` | Quantile levels to compute when `output_type` is "quantiles". |

**Returns**

| Type | Description |
| - | - |
| `np.ndarray` | The endpoint's prediction as an array. |

## Scikit-learn configuration and scoring

The adapters inherit [`get_params`](https://scikit-learn.org/stable/modules/generated/sklearn.base.BaseEstimator.html#sklearn.base.BaseEstimator.get_params), [`set_params`](https://scikit-learn.org/stable/modules/generated/sklearn.base.BaseEstimator.html#sklearn.base.BaseEstimator.set_params), and the corresponding estimator mixin's `score` method. They do not inherit the main hosted client's `save_model`, `load_model`, or model-version selection methods.


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