Skip to content

PriorLabs/tabpfn-client

Folders and files

NameName
Last commit message
Last commit date

Latest commit

23eb595 · Nov 14, 2024

History

86 Commits
Sep 22, 2024
Nov 14, 2024
Mar 11, 2024
Aug 10, 2023
Jun 4, 2024
Nov 13, 2024
Nov 11, 2024
Nov 11, 2024
Sep 22, 2024
Sep 22, 2024
Nov 11, 2024
Jun 4, 2024

Repository files navigation

The client for the (all new) TabPFN

This is an alpha family and friends service, so please do not expect this to never be down or run into errors. It worked fine in the settings that we tried, though.

What model is behind the API? It is a new TabPFN which we allow to handle up to 10K data points with up to 500 features. You can control all pre-processing, the amount of ensembling etc.

We would really appreciate your feedback! Please join our discord community here https://discord.gg/VJRuU3bSxt or email us at [email protected]

How To

Tutorial

colab

We created a colab tutorial to get started quickly.

Installation

pip install tabpfn-client

Usage

Import and login

from tabpfn_client import init, TabPFNClassifier

- To create a new account, simply call the init() or complete the registration process during tabpfn.fit(). 

- Once registered, you will get the information about where your access token is stored, which you can also get by get_token() if it exists.

- Have a valid access token? Directly login using:
init(access_token="valid_access_token")

Now you can use our model just like any other sklearn estimator

tabpfn = TabPFNClassifier()
tabpfn.fit(X_train, y_train)
tabpfn.predict(X_test)
# or you can also use tabpfn.predict_proba(X_test)

To login using your access token, skipping the interactive flow, use:

from tabpfn_client import config

# Retrieve Token
get_token()
from tabpfn_client import config

# Set Token
init(access_token="valid_access_token")

Development

To encourage better coding practices, ruff has been added to the pre-commit hooks. This will ensure that the code is formatted properly before being committed. To enable pre-commit (if you haven't), run the following command:

pre-commit install

Additionally, it is recommended that developers install the ruff extension in their preferred editor. For installation instructions, refer to the Ruff Integrations Documentation.