sasctl.pzmm.zip_model#
- class sasctl.pzmm.zip_model.ZipModel[source]#
Bases:
object
- static zip_files(model_files: dict | str | Path, model_prefix: str, is_viya4: bool | None = False) BytesIO [source]#
Combines all JSON files with the model pickle file and associated score code file into a single archive ZIP file.
If the model_files argument is a string or Path object, then a zip file will be created at the directory location. Otherwise, the zip file is created in memory.
- Parameters:
model_files (str, pathlib.Path, or dict) – Either the directory location of the model files (string or Path object), or a dictionary containing the contents of all the model files.
model_prefix (str) – Variable name for the model to be displayed in SAS Open Model Manager (i.e. hmeqClassTree + [Score.py || .pickle]).
is_viya4 (bool, optional) – Boolean to indicate difference in logic between SAS Viya 3.5 and SAS Viya 4. For Viya 3.5 models, ignore score code that is already in place in the file directory provided. Default value is False.