11import logging
22import pickle
3- import yaml
43from abc import ABC , abstractmethod
54from inspect import isfunction , signature
65from pathlib import Path
98import cloudpickle
109import numpy as np
1110import pandas as pd
11+ import yaml
1212
1313from ...core .core import ModelType
1414from ...core .validation import configured_validate_arguments
@@ -30,17 +30,18 @@ class WrapperModel(BaseModel, ABC):
3030
3131 @configured_validate_arguments
3232 def __init__ (
33- self ,
34- model : Any ,
35- model_type : ModelType ,
36- data_preprocessing_function : Optional [Callable [[pd .DataFrame ], Any ]] = None ,
37- model_postprocessing_function : Optional [Callable [[Any ], Any ]] = None ,
38- name : Optional [str ] = None ,
39- feature_names : Optional [Iterable ] = None ,
40- classification_threshold : Optional [float ] = 0.5 ,
41- classification_labels : Optional [Iterable ] = None ,
42- batch_size : Optional [int ] = None ,
43- ** kwargs ,
33+ self ,
34+ model : Any ,
35+ model_type : ModelType ,
36+ data_preprocessing_function : Optional [Callable [[pd .DataFrame ], Any ]] = None ,
37+ model_postprocessing_function : Optional [Callable [[Any ], Any ]] = None ,
38+ name : Optional [str ] = None ,
39+ feature_names : Optional [Iterable ] = None ,
40+ classification_threshold : Optional [float ] = 0.5 ,
41+ classification_labels : Optional [Iterable ] = None ,
42+ id : Optional [str ] = None ,
43+ batch_size : Optional [int ] = None ,
44+ ** kwargs ,
4445 ) -> None :
4546 """
4647 Parameters
@@ -67,7 +68,16 @@ def __init__(
6768 The batch size to use for inference. Default is ``None``, which
6869 means inference will be done on the full dataframe.
6970 """
70- super ().__init__ (model_type , name , feature_names , classification_threshold , classification_labels , ** kwargs )
71+ super ().__init__ (
72+ model_type = model_type ,
73+ name = name ,
74+ feature_names = feature_names ,
75+ classification_threshold = classification_threshold ,
76+ classification_labels = classification_labels ,
77+ id = id ,
78+ batch_size = batch_size ,
79+ ** kwargs ,
80+ )
7181 self .model = model
7282 self .data_preprocessing_function = data_preprocessing_function
7383 self .model_postprocessing_function = model_postprocessing_function
0 commit comments