@@ -20,14 +20,14 @@ def __init__(
2020
2121
2222@singledispatch
23- def create_handler (model , ptype_data ):
23+ def create_handler (model , prototype_data ):
2424 """check for model type to handle prediction
2525
2626 Parameters
2727 ----------
2828 model: object
2929 Description of parameter `x`.
30- ptype_data : object
30+ prototype_data : object
3131 An object with information (data) whose layout is to be determined.
3232
3333 Returns
@@ -63,7 +63,7 @@ class BaseHandler:
6363 ----------
6464 model :
6565 a trained model
66- ptype_data :
66+ prototype_data :
6767 An object with information (data) whose layout is to be determined.
6868 """
6969
@@ -73,9 +73,9 @@ def __init_subclass__(cls, **kwargs):
7373 with suppress (AttributeError , NameError ):
7474 create_handler .register (cls .model_class (), cls )
7575
76- def __init__ (self , model , ptype_data ):
76+ def __init__ (self , model , prototype_data ):
7777 self .model = model
78- self .ptype_data = ptype_data
78+ self .prototype_data = prototype_data
7979
8080 def describe (self ):
8181 """Create description for model"""
@@ -93,21 +93,21 @@ def create_meta(
9393
9494 return meta
9595
96- def construct_ptype (self ):
96+ def construct_prototype (self ):
9797 """Create data prototype for a model
9898
9999 Parameters
100100 ----------
101- ptype_data : pd.DataFrame, np.ndarray, or None
102- Training data to create ptype
101+ prototype_data : pd.DataFrame, np.ndarray, or None
102+ Training data to create prototype
103103
104104 Returns
105105 -------
106- ptype : pd.DataFrame or None
106+ prototype : pd.DataFrame or None
107107 Zero-row DataFrame for storing data types
108108 """
109- ptype = vetiver_create_ptype (self .ptype_data )
110- return ptype
109+ prototype = vetiver_create_ptype (self .prototype_data )
110+ return prototype
111111
112112 def handler_startup ():
113113 """Include required packages for prediction
@@ -117,7 +117,7 @@ def handler_startup():
117117 """
118118 ...
119119
120- def handler_predict (self , input_data , check_ptype ):
120+ def handler_predict (self , input_data , check_prototype ):
121121 """Generates method for /predict endpoint in VetiverAPI
122122
123123 The `handler_predict` function executes at each API call. Use this
@@ -128,8 +128,8 @@ def handler_predict(self, input_data, check_ptype):
128128 ----------
129129 input_data:
130130 Data used to generate prediction
131- check_ptype :
132- If type should be checked against `ptype ` or not
131+ check_prototype :
132+ If type should be checked against `prototype ` or not
133133
134134 Returns
135135 -------
@@ -144,8 +144,8 @@ def handler_predict(self, input_data, check_ptype):
144144
145145
146146@create_handler .register
147- def _ (model : base .BaseHandler , ptype_data ):
148- if model .ptype_data is None and ptype_data is not None :
149- model .ptype_data = ptype_data
147+ def _ (model : base .BaseHandler , prototype_data ):
148+ if model .prototype_data is None and prototype_data is not None :
149+ model .prototype_data = prototype_data
150150
151151 return model
0 commit comments