Skip to content

Commit da5fb87

Browse files
committed
Annotate and reorder pickle_trained_model; trained_model is optional for mlflow models.
1 parent 9ba15e0 commit da5fb87

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/sasctl/pzmm/pickle_model.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
import pickle
77
import shutil
88
from pathlib import Path
9-
from typing import Optional, Union
9+
from typing import Optional, Union, Any
1010
import h2o
1111

1212
from ..utils.misc import check_if_jupyter
@@ -21,8 +21,8 @@ class PickleModel:
2121
@classmethod
2222
def pickle_trained_model(
2323
cls,
24-
trained_model,
25-
model_prefix,
24+
model_prefix: str,
25+
trained_model: Optional[Any] = None,
2626
pickle_path: Union[str, Path, None] = None,
2727
is_h2o_model: bool = False,
2828
is_binary_model: bool = False,
@@ -41,11 +41,11 @@ def pickle_trained_model(
4141
4242
Parameters
4343
---------------
44-
trained_model : model object, str, or Path
45-
The trained model to be exported
4644
model_prefix : str or Path
4745
Variable name for the model to be displayed in SAS Open Model Manager
4846
(i.e. hmeqClassTree + [Score.py || .pickle]).
47+
trained_model : model object
48+
The trained model to be exported.
4949
pickle_path : str, optional
5050
File location for the output pickle file. The default value is None.
5151
is_h2o_model : bool, optional
@@ -60,7 +60,7 @@ def pickle_trained_model(
6060
file. The default value is False.
6161
mlflow_details : dict, optional
6262
Model details from an MLFlow model. This dictionary is created by the
63-
readMLModelFile function. The default value is None
63+
readMLModelFile function. The default value is None.
6464
6565
Returns
6666
-------

0 commit comments

Comments
 (0)