Skip to main content

TabPFN Common Utilities

Shared Python utilities used across the TabPFN ecosystem (the tabular foundation model).

Features

Data Processing Utilities

  • Regression Results: Handling of prediction outputs with mean, median, mode, and quantiles
  • Data Serialization: Convert between pandas DataFrames, NumPy arrays, and CSV formats
  • Dataset Management: Load and preprocess standard ML datasets with proper train/test splits
  • Preprocessing Configuration: Options for data transformation strategies

Cost Estimation

  • Resource Planning: Estimation of computational costs and duration for TabPFN predictions
  • Cloud Pricing: Useful for resource planning in cloud-based TabPFN services
  • Task-Specific Calculations: Different cost models for classification vs regression tasks

Telemetry (optional, opt-out)

  • Anonymous & Aggregated: No personal information or sensitive data is collected or transmitted
  • Configurable: Can be disabled via environment variable
  • Usage Patterns: Aggregate signals used to improve TabPFN

Installation

pip install tabpfn-common-utils

Or with uv:

uv add tabpfn-common-utils

Quick Start

Regression Results

from tabpfn_common_utils.regression_pred_result import RegressionPredictResult

# Handle regression prediction results
result = RegressionPredictResult({
    "mean": [1.2, 2.3, 3.4],
    "median": [1.1, 2.2, 3.3],
    "mode": [1.0, 2.0, 3.0],
    "quantile_0.25": [0.9, 1.9, 2.9],
    "quantile_0.75": [1.5, 2.5, 3.5]
})

# Convert to basic representation for serialization
basic_repr = RegressionPredictResult.to_basic_representation(result)

Data Utilities

from tabpfn_common_utils.utils import get_example_dataset, serialize_to_csv_formatted_bytes
import pandas as pd

# Load example dataset
X_train, X_test, y_train, y_test = get_example_dataset("iris")

# Serialize data to CSV bytes
csv_bytes = serialize_to_csv_formatted_bytes(X_train)

Telemetry

from tabpfn_common_utils.telemetry import ProductTelemetry

# Initialize telemetry service (anonymous; opt-out)
telemetry = ProductTelemetry()

# Track usage events
telemetry.capture(...)

# Disable via environment variable
export TABPFN_DISABLE_TELEMETRY=1

Telemetry notes

  • Anonymous and aggregated only — no user identification or tracking
  • Disabled by setting TABPFN_DISABLE_TELEMETRY=1
  • Open source — see src/tabpfn_common_utils/telemetry/ for what is sent

Development

Setup

# Install dependencies
uv sync

# Activate virtual environment
source .venv/bin/activate

# Run tests
uv run pytest

# Type checking
uv run pyright

# Code formatting
uv run ruff check --fix

Adding Dependencies

# Add runtime dependency
uv add <package_name>

# Add development dependency
uv add --group dev <package_name>

License

This project is licensed under the Apache License 2.0 - see the LICENSE file for details.

Contributing

Contributions are welcome! Please ensure all code passes type checking and formatting requirements.

Links

Metadata

Release files for tabpfn-common-utils 0.2.23

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for tabpfn-common-utils 0.2.23
File Size Uploaded
tabpfn_common_utils-0.2.23.tar.gz 2.0 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for tabpfn-common-utils 0.2.23
File Interpreter ABI Platform
tabpfn_common_utils-0.2.23-py3-none-any.whl Python 3 none any Details

Total release size: 2.0 MB

Release files / tabpfn_common_utils-0.2.23.tar.gz

Download URL tabpfn_common_utils-0.2.23.tar.gz
Size 2.0 MB
Tags Source
SHA-256 checksum
How to use checksums
4267831070efbcf1baae77e48e28a78a11e87ecda5dcb60744f81c69e7163258
BLAKE2b-256 checksum
How to use checksums
ba8cd1d8e744ade10490d56f653bb0cdba180ff8726c78202a66302ab2578b58
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 22, 2026.

Transparency log

Release files / tabpfn_common_utils-0.2.23-py3-none-any.whl

Download URL tabpfn_common_utils-0.2.23-py3-none-any.whl
Size 40.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e456e917cf2fbe44c3a44352c737ed3194ff572f2ee5141294a59dae053b8af2
BLAKE2b-256 checksum
How to use checksums
4f5f03498070cb10d3998888395cee67016cc6e937138a2e89d9a44ae177dbd7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 22, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.2.23 This release

2 release files

0.2.21

2 release files

0.2.20

2 release files

0.2.19

2 release files

0.2.16

2 release files

0.2.14

2 release files

0.2.13

2 release files

0.2.12

2 release files

0.2.10

2 release files

0.2.9

2 release files

0.2.8

2 release files

0.2.7

2 release files

0.2.6

2 release files

0.2.5

2 release files

0.2.4

2 release files

0.2.3

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.9

2 release files

0.1.7

2 release files

0.1.6

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page