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. See zip_model() section for the details.

Changed in version 0.9.0: compression and compresslevel parameters are added.

New 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 under model_path. Defaults to False.

  • compression (optional) – Identifier of the ZIP compression method to use. This method uses zipfile.ZipFile class internally and compression and compresslevel 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.