from vetiver import mock, VetiverModel, VetiverAPI
= mock.get_mock_data()
X, y = mock.get_mock_model().fit(X, y)
model
= VetiverModel(model = model, model_name = "model", prototype_data = X)
v = VetiverAPI(model = v, check_prototype = True)
v_api
def sum_values(x):
return x.sum()
"sums") v_api.vetiver_post(sum_values,
VetiverAPI.vetiver_post
str = None, **kw) VetiverAPI.vetiver_post(endpoint_fx: Callable, endpoint_name:
Create new POST endpoint that is aware of model input data
Parameters
endpoint_fx : typing.Callable
-
Custom function to be run at endpoint
endpoint_name : str = None
-
Name of endpoint