Model.backup#
- Model.backup(filepath, datapath=None)[source]#
Back up the model to a file.
Backup the model to a single binary file. This method internally utilizes Python’s standard library, pickle. This method should only be used for saving the model temporarily, as the saved model may not be restored by different versions of modelx, or when the Python environment changes, for example, due to package upgrade. Saving the model by
write()
method is more robust.Changed in version 0.9.0:
datapath
parameter is added.New in version 0.7.0.
- Parameters
filepath (str) – file path
datapath (optional) – Path to a folder to store internal files.
See also