vetiver.predict#

vetiver.predict(endpoint, data: Union[dict, pandas.core.frame.DataFrame, pandas.core.series.Series], **kw)#

Make a prediction from model endpoint

Parameters
  • endpoint – URI path to endpoint

  • data (Union[dict, pd.DataFrame, pd.Series]) – Name of endpoint

Returns

Endpoint_name and list of endpoint_fx output

Return type

dict

Example

>>> import vetiver
>>> X, y = vetiver.get_mock_data()
>>> endpoint = vetiver.vetiver_endpoint(url='http://127.0.0.1:8000/predict')
>>> vetiver.predict(endpoint, X)