TabICL

raw JSON →
2.1.1 verified Fri May 01 auth: no python

TabICL (Tabular In-Context Learning) is a state-of-the-art tabular foundation model for few-shot and zero-shot learning on tabular data. Current version 2.1.1, actively maintained.

pip install tabicl
error ImportError: cannot import name 'TabICL' from 'tabicl'
cause Incorrect import path; possibly using an older version or wrong module name.
fix
Use 'from tabicl import TabICL'. Ensure tabicl version 2.1.1 is installed: pip install tabicl==2.1.1
error RuntimeError: Expected input to be a pandas DataFrame
cause Passing a numpy array or list instead of DataFrame.
fix
Wrap your data: data = pd.DataFrame(data). TabICL's API explicitly requires DataFrame.
breaking TabICL v2.x requires Python >=3.10 and PyTorch >=2.0. Older versions (1.x) are incompatible and use different APIs.
fix Ensure Python 3.10+ and upgrade PyTorch to 2.0+. Do not install older tabicl versions.
gotcha TabICL expects data in pandas DataFrame format with no missing values. NaN or None will cause silent errors or poor performance.
fix Impute missing values before passing data. Use pandas .fillna() or similar.

Basic usage of TabICL for tabular data prediction.

import pandas as pd
from tabicl import TabICL

# Load or create a pandas DataFrame with your data
# data = pd.read_csv('your_data.csv')

# Initialize the model
model = TabICL(pretrained=True)

# Example: predict on a dataset (adjust as per your task)
# predictions = model.predict(data)
print('TabICL model loaded successfully')