predictionClass

@JvmName(name = "qaqwrpcvwooaxtwn")
suspend fun predictionClass(value: Output<String>)
@JvmName(name = "mwpaqigspggmucyy")
suspend fun predictionClass(value: String?)

Parameters

value

Optional. The fully qualified name (module_name.class_name) of a class that implements the Predictor interface described in this reference field. The module containing this class should be included in a package provided to the #Version.FIELDS.package_uris. Specify this field if and only if you are deploying a /ml-engine/docs/tensorflow/custom-prediction-routines. If you specify this field, you must set #Version.FIELDS.runtime_version to 1.4 or greater and you must set machineType to a /ml-engine/docs/machine-types-online-prediction. The following code sample provides the Predictor interface: class Predictor(object): """Interface for constructing custom predictors.""" def predict(self, instances, **kwargs): """Performs custom prediction. Instances are the decoded values from the request. They have already been deserialized from JSON. Args: instances: A list of prediction input instances. **kwargs: A dictionary of keyword args provided as additional fields on the predict request body. Returns: A list of outputs containing the prediction results. This list must be JSON serializable. """ raise NotImplementedError() @classmethod def from_path(cls, model_dir): """Creates an instance of Predictor using the given path. Loading of the predictor should be done in this method. Args: model_dir: The local directory that contains the exported model file along with any additional files uploaded when creating the version resource. Returns: An instance implementing this Predictor class. """ raise NotImplementedError() Learn more about /ml-engine/docs/tensorflow/custom-prediction-routines.