
.TH "GCLOUD_AI\-PLATFORM_VERSIONS_CREATE" 1



.SH "NAME"
.HP
gcloud ai\-platform versions create \- create a new AI Platform version



.SH "SYNOPSIS"
.HP
\f5gcloud ai\-platform versions create\fR \fIVERSION\fR \fB\-\-model\fR=\fIMODEL\fR [\fB\-\-accelerator\fR=[\fIcount\fR=\fICOUNT\fR],[\fItype\fR=\fITYPE\fR]] [\fB\-\-async\fR] [\fB\-\-config\fR=\fICONFIG\fR] [\fB\-\-description\fR=\fIDESCRIPTION\fR] [\fB\-\-framework\fR=\fIFRAMEWORK\fR] [\fB\-\-labels\fR=[\fIKEY\fR=\fIVALUE\fR,...]] [\fB\-\-machine\-type\fR=\fIMACHINE_TYPE\fR] [\fB\-\-origin\fR=\fIORIGIN\fR] [\fB\-\-python\-version\fR=\fIPYTHON_VERSION\fR] [\fB\-\-region\fR=\fIREGION\fR] [\fB\-\-runtime\-version\fR=\fIRUNTIME_VERSION\fR] [\fB\-\-staging\-bucket\fR=\fISTAGING_BUCKET\fR] [\fB\-\-max\-nodes\fR=\fIMAX_NODES\fR\ \fB\-\-metric\-targets\fR=[\fIMETRIC\-NAME\fR=\fITARGET\fR,...]\ \fB\-\-min\-nodes\fR=\fIMIN_NODES\fR] [\fIGCLOUD_WIDE_FLAG\ ...\fR]



.SH "DESCRIPTION"

Creates a new version of an AI Platform model.

For more details on managing AI Platform models and versions see
https://cloud.google.com/ai\-platform/prediction/docs/managing\-models\-jobs



.SH "EXAMPLES"

To create an AI Platform version model with the version ID 'versionId' and with
the name 'model\-name', run:

.RS 2m
$ gcloud ai\-platform versions create versionId \-\-model=model\-name
.RE



.SH "POSITIONAL ARGUMENTS"

.RS 2m
.TP 2m
\fIVERSION\fR

Name of the model version.


.RE
.sp

.SH "REQUIRED FLAGS"

.RS 2m
.TP 2m
\fB\-\-model\fR=\fIMODEL\fR

Name of the model.


.RE
.sp

.SH "OPTIONAL FLAGS"

.RS 2m
.TP 2m
\fB\-\-accelerator\fR=[\fIcount\fR=\fICOUNT\fR],[\fItype\fR=\fITYPE\fR]

Manage the accelerator config for GPU serving. When deploying a model with
Compute Engine Machine Types, a GPU accelerator may also be selected.

.RS 2m
.TP 2m
\fBtype\fR
The type of the accelerator. Choices are 'nvidia\-tesla\-a100',
\'nvidia\-tesla\-k80', 'nvidia\-tesla\-p100', 'nvidia\-tesla\-p4',
\'nvidia\-tesla\-t4', 'nvidia\-tesla\-v100'.

.TP 2m
\fBcount\fR
The number of accelerators to attach to each machine running the job. If not
specified, the default value is 1. Your model must be specially designed to
accommodate more than 1 accelerator per machine. To configure how many replicas
your model has, set the \f5manualScaling\fR or \f5autoScaling\fR parameters.

.RE
.sp
.TP 2m
\fB\-\-async\fR

Return immediately, without waiting for the operation in progress to complete.

.TP 2m
\fB\-\-config\fR=\fICONFIG\fR

Path to a YAML configuration file containing configuration parameters for the
Version
(https://cloud.google.com/ai\-platform/prediction/docs/reference/rest/v1/projects.models.versions)
to create.

The file is in YAML format. Note that not all attributes of a version are
configurable; available attributes (with example values) are:

.RS 2m
description: A free\-form description of the version.
deploymentUri: gs://path/to/source
runtimeVersion: '2.1'
#  Set only one of either manualScaling or autoScaling.
manualScaling:
  nodes: 10  # The number of nodes to allocate for this model.
autoScaling:
  minNodes: 0  # The minimum number of nodes to allocate for this model.
labels:
  user\-defined\-key: user\-defined\-value
.RE

The name of the version must always be specified via the required VERSION
argument.

Only one of manualScaling or autoScaling can be specified. If both are specified
in same yaml file an error will be returned.

If an option is specified both in the configuration file and via command\-line
arguments, the command\-line arguments override the configuration file.

.TP 2m
\fB\-\-description\fR=\fIDESCRIPTION\fR

Description of the version.

.TP 2m
\fB\-\-framework\fR=\fIFRAMEWORK\fR

ML framework used to train this version of the model. If not specified, defaults
to 'tensorflow'. \fIFRAMEWORK\fR must be one of: \fBscikit\-learn\fR,
\fBtensorflow\fR, \fBxgboost\fR.

.TP 2m
\fB\-\-labels\fR=[\fIKEY\fR=\fIVALUE\fR,...]

List of label KEY=VALUE pairs to add.

Keys must start with a lowercase character and contain only hyphens (\f5\-\fR),
underscores (\f5_\fR), lowercase characters, and numbers. Values must contain
only hyphens (\f5\-\fR), underscores (\f5_\fR), lowercase characters, and
numbers.

.TP 2m
\fB\-\-machine\-type\fR=\fIMACHINE_TYPE\fR

Type of machine on which to serve the model. Currently only applies to online
prediction. For available machine types, see
https://cloud.google.com/ai\-platform/prediction/docs/machine\-types\-online\-prediction#available_machine_types.

.TP 2m
\fB\-\-origin\fR=\fIORIGIN\fR

Location of \f5model/\fR "directory" (see
https://cloud.google.com/ai\-platform/prediction/docs/deploying\-models#upload\-model).

This overrides \f5deploymentUri\fR in the \f5\-\-config\fR file. If this flag is
not passed, \f5deploymentUri\fR \fBmust\fR be specified in the file from
\f5\-\-config\fR.

Can be a Cloud Storage (\f5gs://\fR) path or local file path (no prefix). In the
latter case the files will be uploaded to Cloud Storage and a
\f5\-\-staging\-bucket\fR argument is required.

.TP 2m
\fB\-\-python\-version\fR=\fIPYTHON_VERSION\fR

Version of Python used when creating the version. Choices are 3.7, 3.5, and 2.7.
However, this value must be compatible with the chosen runtime version for the
job.

Must be used with a compatible runtime version:

.RS 2m
.IP "\(em" 2m
3.7 is compatible with runtime versions 1.15 and later.
.IP "\(em" 2m
3.5 is compatible with runtime versions 1.4 through 1.14.
.IP "\(em" 2m
2.7 is compatible with runtime versions 1.15 and earlier.
.RE
.sp

.TP 2m
\fB\-\-region\fR=\fIREGION\fR

Google Cloud region of the regional endpoint to use for this command. For the
global endpoint, the region needs to be specified as \f5global\fR.

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

\fIREGION\fR must be one of: \fBglobal\fR, \fBasia\-east1\fR,
\fBasia\-northeast1\fR, \fBasia\-southeast1\fR, \fBaustralia\-southeast1\fR,
\fBeurope\-west1\fR, \fBeurope\-west2\fR, \fBeurope\-west3\fR,
\fBeurope\-west4\fR, \fBnorthamerica\-northeast1\fR, \fBus\-central1\fR,
\fBus\-east1\fR, \fBus\-east4\fR, \fBus\-west1\fR.

.TP 2m
\fB\-\-runtime\-version\fR=\fIRUNTIME_VERSION\fR

AI Platform runtime version for this job. Must be specified unless
\-\-master\-image\-uri is specified instead. It is defined in documentation
along with the list of supported versions:
https://cloud.google.com/ai\-platform/prediction/docs/runtime\-version\-list

.TP 2m
\fB\-\-staging\-bucket\fR=\fISTAGING_BUCKET\fR

Bucket in which to stage training archives.

Required only if a file upload is necessary (that is, other flags include local
paths) and no other flags implicitly specify an upload path.

.TP 2m

Configure the autoscaling settings to be deployed.


.TP 2m
\fB\-\-max\-nodes\fR=\fIMAX_NODES\fR

The maximum number of nodes to scale this model under load.

.TP 2m
\fB\-\-metric\-targets\fR=[\fIMETRIC\-NAME\fR=\fITARGET\fR,...]

List of key\-value pairs to set as metrics' target for autoscaling. Autoscaling
could be based on CPU usage or GPU duty cycle, valid key could be cpu\-usage or
gpu\-duty\-cycle.

.TP 2m
\fB\-\-min\-nodes\fR=\fIMIN_NODES\fR

The minimum number of nodes to scale this model under load.


.RE
.sp

.SH "GCLOUD WIDE FLAGS"

These flags are available to all commands: \-\-access\-token\-file, \-\-account,
\-\-billing\-project, \-\-configuration, \-\-flags\-file, \-\-flatten,
\-\-format, \-\-help, \-\-impersonate\-service\-account, \-\-log\-http,
\-\-project, \-\-quiet, \-\-trace\-token, \-\-user\-output\-enabled,
\-\-verbosity.

Run \fB$ gcloud help\fR for details.



.SH "NOTES"

These variants are also available:

.RS 2m
$ gcloud alpha ai\-platform versions create
.RE

.RS 2m
$ gcloud beta ai\-platform versions create
.RE


