kosmos.ml.cl_manager

Classes

class CLManager(config: kosmos.ml.config.sl_train.SLTrainConfig)[source]

Centralized learning manager for supervised learning classification tasks.

config

Supervised learning training configuration.

Type:

SLTrainConfig

dataset

The dataset used for training and testing.

Type:

SLDataset

model

The model instance to be trained.

Type:

Model

trainer

The trainer instance managing the training process.

Type:

SLTrainer

train_loader

DataLoader for the training data.

Type:

DataLoader

test_loader

DataLoader for the test data.

Type:

DataLoader

Initialize the centralized learning manager.

Parameters:

config – Supervised learning training configuration.


Methods

train() collections.abc.Iterator[kosmos.ml.sl_result.SLTrainIterationResult][source]

Run training on the train data over the configured number of epochs.

Returns:

An iterator yielding one train result per epoch.

Return type:

Iterator[SLTrainIterationResult]

test() kosmos.ml.sl_result.SLTestIterationResult[source]

Evaluate the model on the test data.

Returns:

Result of the test iteration.

Return type:

SLTestIterationResult