finesse.model.Model.save¶
- Model.save(path: Path)[source]¶
Save the model to a file. This uses the dill library to pickle the model which will save all the model data and the current state. This is not gauraunteed to work across python versions or across diferrent platforms and systems. It should only be used to load and save models within the same python environment and not for long term storage. Files will be overwritten if they already exist.
- Parameters
- pathPath
The path to save the model to. If no extension is given then a .pkl will be added.
- Returns
- pathPath
The path the model was saved to.
Examples
>>> model.save('mymodel.pkl') >>> loaded_model = finesse.model.load('mymodel.pkl')