API Reference

ExtraColumn

class monad.config.ExtraColumn

Defines early stopping callback for the training.

from monad.config import ExtraColumn, SQLLambda
from monad.ui.module import BinaryClassificationTask, load_from_foundation_model


# declare extra columns used in training
transaction_id_column = ExtraColumn(
    data_source_name="transactions",
    columns=["transaction_id"],
)

# load trainer initialized from the foundation model
trainer = load_from_foundation_model(
    checkpoint_path="path/to/foundation/model",
    downstream_task=BinaryClassificationTask(),
    target_fn=...,
    extra_columns=[transaction_id_column],
)
Parameters

data_source_name: str
Name of the data source


columns: list[str |SQLLambda]
Columns discarded during fit stage, that should be available in the data_source e.g. for target function definition. Columns can be defined with a column name or sql_lambda.