TabularTask
Describes a flat, single-table prediction task for ICLEstimator — no relational schema, no foreign/candidate keys, no DFS. TabularTask supports every task type ICL supports on a flat table, including forecasting, which has no equivalent on the relational (NodeTask) path.
Used together with TabularDataset, which simply wraps a connector and a TabularTask.
Parameters
Section titled “Parameters”| Parameter | Type | Description | Optional |
|---|---|---|---|
name | str | Human-readable task name. | No |
task_type | TaskType | One of TaskType.BINARY_CLASSIFICATION, MULTICLASS_CLASSIFICATION, REGRESSION, or FORECASTING. | No |
label_column | str | Column holding the target labels or values. | No |
train_table | str | Path to the training split. Optional — recorded for reference only. ICLEstimator never uses it as context; there is no training loop, so it has no other purpose here. | Yes |
validation_table | str | Path to the validation split, required by score() (or pass val_table= at call time). | Yes |
test_table | str | Path to the test split, required by predict() (or pass test_table= at call time). | Yes |
context_table | str | Table used as the zero-shot ICL context. Required for predict()/score() — must be set explicitly. | Yes (required at call time) |
time_column | str | Datetime column. Required when task_type=FORECASTING; also used by the "most_recent"/"mixed" sampling strategies for classification/regression. | Yes / required for forecasting |
item_id_column | str | Series partition key for panel forecasting (multiple entities, one series each). Omit (None) for single-entity forecasting. | Yes |
prediction_length | int | Steps ahead to forecast. Required when task_type=FORECASTING; must be >= 1. | Required for forecasting |
max_context_length | int | Max history length (in time steps) the forecaster looks back over. Required when task_type=FORECASTING; must be >= 1. | Required for forecasting |
evaluation_metric | EvaluationMetric | Metric to compute in score(). Auto-selected when None. Must be a valid metric for task_type. | Yes |
column_dtypes | Dict[str, str] | Optional dtype overrides applied before featurization. | Yes |
Returns
Section titled “Returns”An instance of the TabularTask class.
Example — classification
Section titled “Example — classification”from relationalai_predictive import TabularTask, TaskType
task = TabularTask( name="churn", task_type=TaskType.BINARY_CLASSIFICATION, label_column="churned", context_table="DATABASE.SCHEMA.CHURN_CONTEXT", test_table="DATABASE.SCHEMA.CHURN_TEST", validation_table="DATABASE.SCHEMA.CHURN_VALIDATION",)Example — forecasting
Section titled “Example — forecasting”from relationalai_predictive import TabularTask, TaskType
task = TabularTask( name="sales_forecast", task_type=TaskType.FORECASTING, label_column="sales", context_table="DATABASE.SCHEMA.SALES_CONTEXT", test_table="DATABASE.SCHEMA.SALES_TEST", time_column="date", item_id_column="store_id", prediction_length=12, max_context_length=64,)