Supervised Task

The SupervisedTask trains and evaluates models on fixed data splits without active learning. It trains the surrogate model on the training set, evaluates predictions on validation and test sets, and computes evaluation metrics. This task is useful for benchmarking model performance and validating surrogate model quality.

class alf_core.tasks.supervised_task.SupervisedTask(**kwargs)[source]

Bases: BaseTask

Supervised learning task for training and evaluating models on fixed splits. Trains the surrogate model on the training set and evaluates it on the test set.

run(state, state_loggers)[source]

Run the supervised learning task.

Trains the surrogate model on the training and validation sets, then evaluates it on the test set. Saves predictions and logs metrics.

Parameters:
  • state (State) – Task state with dataset and surrogate model.

  • state_loggers (list[StateLogger]) – List of StateLogger for recording the state.

Return type:

None