mlrl.testbed.persistence module

Author: Michael Rapp (michael.rapp.ml@gmail.com)

Provides classes for saving/loading models to/from disk.

class mlrl.testbed.persistence.ModelPersistence(model_dir: str)

Bases: object

Allows to save a model in a file and load it later.

load_model(model_name: str, data_split: DataSplit)

Loads a model from a file.

Parameters:
  • model_name – The name of the model to be loaded

  • data_split – Information about the split of the available data, the model corresponds to

Returns:

The loaded model

save_model(model, model_name: str, data_split: DataSplit)

Saves a model to a file.

Parameters:
  • model – The model to be persisted

  • model_name – The name of the model to be persisted

  • data_split – Information about the split of the available data, the model corresponds to