Skip to content

[ENH] save/load functionality for models #3022

@fkiraly

Description

@fkiraly

It would be useful to have save/load functionality for models, e.g., as a method with a primary preferred mode.

A way to implement this could be a save method that BaseEstimator has, similar to keras.save, which saves and/or returns (parameter dependent) a pickle.

"Ordinary" estimators would have the pickle default in save, which can be overridden by specific functionality, e.g., in BaseCNNClassifier, for neural networks.

The counterpart would be a load method - in each given module root, e.g., from sktime.classification import load.

Usage:

# session 1 - building/fitting an estimator
stuff
my_estimator.fit(data)
stuff
my_estimator.save(hd_location) # saves fitted estimator

# session 2 - retrieving/loading estimator
from sktime.classification import load

my_estimator = load(hd_location)

Metadata

Metadata

Assignees

Labels

enhancementAdding new functionalitygood first issueGood for newcomersimplementing frameworkImplementing or improving framework for learning tasks, e.g., base class functionality

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions