Predict using a Web API

Performs a prediction using a Web API providing a SavedModel.

# S3 method for webapi_prediction
predict_savedmodel(instances, model, ...)

Arguments

instances

A list of prediction instances to be passed as input tensors to the service. Even for single predictions, a list with one entry is expected.

model

The model as a local path, a REST url, CloudML name or graph object.

A local path can be exported using export_savedmodel(), a REST URL can be created using serve_savedmodel(), a CloudML model can be deployed usin cloudml::cloudml_deploy() and a graph object loaded using load_savedmodel().

Notice that predicting over a CloudML model requires a version parameter to identify the model.

A type parameter can be specified to explicitly choose the type model performing the prediction. Valid values are cloudml, export, webapi and graph.

...

See predict_savedmodel.export_prediction(), predict_savedmodel.graph_prediction(), predict_savedmodel.webapi_prediction() and predict_savedmodel.cloudml_prediction() for additional options.

#' @section Implementations: