Model.zip#
- Model.zip(model_path, backup=True, log_input=False, compression=8, compresslevel=None)[source]#
Archive model to a zip file.
This method performs the
zip_model()
on self. Seezip_model()
section for the details.Changed in version 0.9.0:
compression
andcompresslevel
parameters are added.Added in version 0.8.0.
- Parameters:
model_path (str) – Folder(directory) path where the model is saved.
backup (bool, optional) – Whether to backup an existing file with the same name if it already exists. Defaults to
True
.log_input (bool, optional) – If
True
, input values in Cells are output to _input_log.txt undermodel_path
. Defaults toFalse
.compression (optional) – Identifier of the ZIP compression method to use. This method uses zipfile.ZipFile class internally and
compression
andcompresslevel
arguments are passed to zipfile.ZipFile constructor. See zipfile.ZipFile manual page for available identifiers. Defaults to zipfile.ZIP_DEFLATED.compresslevel (optional) – Integer identifier to indicate the compression level to use. If not specified, the default compression level is used. See zipfile.ZipFile explanation on the Python Standard Library site for available integer identifiers for each compression method. For Python 3.6, this parameter is ignored.