gcloud beta ai-platform predict

gcloud beta ai-platform predict - run AI Platform online prediction
gcloud beta ai-platform predict --model=MODEL (--json-instances=JSON_INSTANCES     | --json-request=JSON_REQUEST     | --text-instances=TEXT_INSTANCES) [--region=REGION] [--signature-name=SIGNATURE_NAME] [--version=VERSION] [GCLOUD_WIDE_FLAG]
(BETA) gcloud beta ai-platform predict sends a prediction request to AI Platform for the given instances. This command will read up to 100 instances, though the service itself will accept instances up to the payload limit size (currently, 1.5MB). If you are predicting on more instances, you should use batch prediction via
gcloud beta ai-platform jobs submit prediction.
Name of the model.
Exactly one of these must be specified:
Path to a local file from which instances are read. Instances are in JSON format; newline delimited.

An example of the JSON instances file:

{"images": [0.0, …, 0.1], "key": 3}
{"images": [0.0, …, 0.1], "key": 2}

This flag accepts "-" for stdin.

Path to a local file containing the body of JSON request.

An example of a JSON request:

  "instances": [
    {"x": [1, 2], "y": [3, 4]},
    {"x": [-1, -2], "y": [-3, -4]}

This flag accepts "-" for stdin.

Path to a local file from which instances are read. Instances are in UTF-8 encoded text format; newline delimited.

An example of the text instances file:


This flag accepts "-" for stdin.

Google Cloud region of the regional endpoint to use for this command. If unspecified, the command uses the global endpoint of the AI Platform Training and Prediction API.

Learn more about regional endpoints and see a list of available regions: https://cloud.google.com/ai-platform/prediction/docs/regional-endpoints

REGION must be one of: global, asia-east1, asia-northeast1, asia-southeast1, australia-southeast1, europe-west1, europe-west2, europe-west3, europe-west4, northamerica-northeast1, us-central1, us-east1, us-east4, us-west1.

Name of the signature defined in the SavedModel to use for this job. Defaults to DEFAULT_SERVING_SIGNATURE_DEF_KEY in https://www.tensorflow.org/api_docs/python/tf/compat/v1/saved_model/signature_constants, which is "serving_default". Only applies to TensorFlow models.
Model version to be used.

If unspecified, the default version of the model will be used. To list model versions run

gcloud beta ai-platform versions list
These flags are available to all commands: --account, --billing-project, --configuration, --flags-file, --flatten, --format, --help, --impersonate-service-account, --log-http, --project, --quiet, --trace-token, --user-output-enabled, --verbosity.

Run $ gcloud help for details.

This command is currently in BETA and may change without notice. These variants are also available:
gcloud ai-platform predict
gcloud alpha ai-platform predict