save_model()
Save a fitted model to the models output folder with pickle (<name>.pkl).
The file is recorded in the results table of framework.db.
Usage
save_model(model: Any, name: str, public: bool = False, overwrite: bool = True) -> Path
Arguments
| Name | Type | Default | Description |
|---|---|---|---|
| model required | Any |
The model, or any object pickle can save. |
|
| name required | str |
The file name without extension. |
|
| public | bool | False |
In a sensitive project, save to the public models folder. |
| overwrite | bool | True |
Replace an existing file. |
Value
The saved file.
Raises
FrameworkError: When the file exists andoverwriteis False.