
.TH "GCLOUD_AI_MODELS_UPLOAD" 1



.SH "NAME"
.HP
gcloud ai models upload \- upload a new model



.SH "SYNOPSIS"
.HP
\f5gcloud ai models upload\fR \fB\-\-container\-image\-uri\fR=\fICONTAINER_IMAGE_URI\fR \fB\-\-display\-name\fR=\fIDISPLAY_NAME\fR [\fB\-\-artifact\-uri\fR=\fIARTIFACT_URI\fR] [\fB\-\-container\-args\fR=[\fIARG\fR,...]] [\fB\-\-container\-command\fR=[\fICOMMAND\fR,...]] [\fB\-\-container\-deployment\-timeout\-seconds\fR=\fICONTAINER_DEPLOYMENT_TIMEOUT_SECONDS\fR] [\fB\-\-container\-env\-vars\fR=[\fIKEY\fR=\fIVALUE\fR,...]] [\fB\-\-container\-grpc\-ports\fR=[\fIPORT\fR,...]] [\fB\-\-container\-health\-probe\-exec\fR=[\fIHEALTH_PROBE_EXEC\fR,...]] [\fB\-\-container\-health\-probe\-period\-seconds\fR=\fICONTAINER_HEALTH_PROBE_PERIOD_SECONDS\fR] [\fB\-\-container\-health\-probe\-timeout\-seconds\fR=\fICONTAINER_HEALTH_PROBE_TIMEOUT_SECONDS\fR] [\fB\-\-container\-health\-route\fR=\fICONTAINER_HEALTH_ROUTE\fR] [\fB\-\-container\-ports\fR=[\fIPORT\fR,...]] [\fB\-\-container\-predict\-route\fR=\fICONTAINER_PREDICT_ROUTE\fR] [\fB\-\-container\-shared\-memory\-size\-mb\fR=\fICONTAINER_SHARED_MEMORY_SIZE_MB\fR] [\fB\-\-container\-startup\-probe\-exec\fR=[\fISTARTUP_PROBE_EXEC\fR,...]] [\fB\-\-container\-startup\-probe\-period\-seconds\fR=\fICONTAINER_STARTUP_PROBE_PERIOD_SECONDS\fR] [\fB\-\-container\-startup\-probe\-timeout\-seconds\fR=\fICONTAINER_STARTUP_PROBE_TIMEOUT_SECONDS\fR] [\fB\-\-description\fR=\fIDESCRIPTION\fR] [\fB\-\-explanation\-metadata\-file\fR=\fIEXPLANATION_METADATA_FILE\fR] [\fB\-\-explanation\-method\fR=\fIEXPLANATION_METHOD\fR] [\fB\-\-explanation\-path\-count\fR=\fIEXPLANATION_PATH_COUNT\fR] [\fB\-\-explanation\-step\-count\fR=\fIEXPLANATION_STEP_COUNT\fR] [\fB\-\-labels\fR=[\fIKEY\fR=\fIVALUE\fR,...]] [\fB\-\-model\-id\fR=\fIMODEL_ID\fR] [\fB\-\-parent\-model\fR=\fIPARENT_MODEL\fR] [\fB\-\-region\fR=\fIREGION\fR] [\fB\-\-smooth\-grad\-noise\-sigma\fR=\fISMOOTH_GRAD_NOISE_SIGMA\fR] [\fB\-\-smooth\-grad\-noise\-sigma\-by\-feature\fR=[\fIKEY\fR=\fIVALUE\fR,...]] [\fB\-\-smooth\-grad\-noisy\-sample\-count\fR=\fISMOOTH_GRAD_NOISY_SAMPLE_COUNT\fR] [\fB\-\-version\-aliases\fR=[\fIVERSION_ALIASES\fR,...]] [\fB\-\-version\-description\fR=\fIVERSION_DESCRIPTION\fR] [\fIGCLOUD_WIDE_FLAG\ ...\fR]



.SH "EXAMPLES"

To upload a model under project \f5\fIexample\fR\fR in region
\f5\fIus\-central1\fR\fR, run:

.RS 2m
$ gcloud ai models upload \e
    \-\-container\-image\-uri="gcr.io/example/my\-image" \e
    \-\-description=example\-model \-\-display\-name=my\-model \e
    \-\-artifact\-uri='gs://bucket/path' \-\-project=example \e
    \-\-region=us\-central1
.RE



.SH "REQUIRED FLAGS"

.RS 2m
.TP 2m
\fB\-\-container\-image\-uri\fR=\fICONTAINER_IMAGE_URI\fR

URI of the Model serving container file in the Container Registry (e.g.
gcr.io/myproject/server:latest).

.TP 2m
\fB\-\-display\-name\fR=\fIDISPLAY_NAME\fR

Display name of the model.


.RE
.sp

.SH "OPTIONAL FLAGS"

.RS 2m
.TP 2m
\fB\-\-artifact\-uri\fR=\fIARTIFACT_URI\fR

Path to the directory containing the Model artifact and any of its supporting
files.

.TP 2m
\fB\-\-container\-args\fR=[\fIARG\fR,...]

Comma\-separated arguments passed to the command run by the container image. If
not specified and no \f5\-\-command\fR is provided, the container image's
default command is used.

.TP 2m
\fB\-\-container\-command\fR=[\fICOMMAND\fR,...]

Entrypoint for the container image. If not specified, the container image's
default entrypoint is run.

.TP 2m
\fB\-\-container\-deployment\-timeout\-seconds\fR=\fICONTAINER_DEPLOYMENT_TIMEOUT_SECONDS\fR

Deployment timeout in seconds.

.TP 2m
\fB\-\-container\-env\-vars\fR=[\fIKEY\fR=\fIVALUE\fR,...]

List of key\-value pairs to set as environment variables.

.TP 2m
\fB\-\-container\-grpc\-ports\fR=[\fIPORT\fR,...]

Container ports to receive grpc requests at. Must be a number between 1 and
65535, inclusive.

.TP 2m
\fB\-\-container\-health\-probe\-exec\fR=[\fIHEALTH_PROBE_EXEC\fR,...]

Exec specifies the action to take. Used by health probe. An example of this
argument would be ["cat", "/tmp/healthy"].

.TP 2m
\fB\-\-container\-health\-probe\-period\-seconds\fR=\fICONTAINER_HEALTH_PROBE_PERIOD_SECONDS\fR

How often (in seconds) to perform the health probe. Default to 10 seconds.
Minimum value is 1.

.TP 2m
\fB\-\-container\-health\-probe\-timeout\-seconds\fR=\fICONTAINER_HEALTH_PROBE_TIMEOUT_SECONDS\fR

Number of seconds after which the health probe times out. Defaults to 1 second.
Minimum value is 1.

.TP 2m
\fB\-\-container\-health\-route\fR=\fICONTAINER_HEALTH_ROUTE\fR

HTTP path to send health checks to inside the container.

.TP 2m
\fB\-\-container\-ports\fR=[\fIPORT\fR,...]

Container ports to receive http requests at. Must be a number between 1 and
65535, inclusive.

.TP 2m
\fB\-\-container\-predict\-route\fR=\fICONTAINER_PREDICT_ROUTE\fR

HTTP path to send prediction requests to inside the container.

.TP 2m
\fB\-\-container\-shared\-memory\-size\-mb\fR=\fICONTAINER_SHARED_MEMORY_SIZE_MB\fR

The amount of the VM memory to reserve as the shared memory for the model in
megabytes.

.TP 2m
\fB\-\-container\-startup\-probe\-exec\fR=[\fISTARTUP_PROBE_EXEC\fR,...]

Exec specifies the action to take. Used by startup probe. An example of this
argument would be ["cat", "/tmp/healthy"].

.TP 2m
\fB\-\-container\-startup\-probe\-period\-seconds\fR=\fICONTAINER_STARTUP_PROBE_PERIOD_SECONDS\fR

How often (in seconds) to perform the startup probe. Default to 10 seconds.
Minimum value is 1.

.TP 2m
\fB\-\-container\-startup\-probe\-timeout\-seconds\fR=\fICONTAINER_STARTUP_PROBE_TIMEOUT_SECONDS\fR

Number of seconds after which the startup probe times out. Defaults to 1 second.
Minimum value is 1.

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

Description of the model.

.TP 2m
\fB\-\-explanation\-metadata\-file\fR=\fIEXPLANATION_METADATA_FILE\fR

Path to a local JSON file that contains the metadata describing the Model's
input and output for explanation.

.TP 2m
\fB\-\-explanation\-method\fR=\fIEXPLANATION_METHOD\fR

Method used for explanation. Accepted values are \f5integrated\-gradients\fR,
\f5xrai\fR and \f5sampled\-shapley\fR.

.TP 2m
\fB\-\-explanation\-path\-count\fR=\fIEXPLANATION_PATH_COUNT\fR

Number of feature permutations to consider when approximating the Shapley values
for explanation.

.TP 2m
\fB\-\-explanation\-step\-count\fR=\fIEXPLANATION_STEP_COUNT\fR

Number of steps to approximate the path integral for explanation.

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

Labels with user\-defined metadata to organize your Models.

Label keys and values can be no longer than 64 characters (Unicode codepoints),
can only contain lowercase letters, numeric characters, underscores and dashes.
International characters are allowed.

See https://goo.gl/xmQnxf for more information and examples of labels.

.TP 2m
\fB\-\-model\-id\fR=\fIMODEL_ID\fR

ID to use for the uploaded Model, which will become the final component of the
model resource name.

.TP 2m
\fB\-\-parent\-model\fR=\fIPARENT_MODEL\fR

Resource name of the model into which to upload the version. Only specify this
field when uploading a new version.

Value should be provided in format:
projects/\f5\fIPROJECT_ID\fR\fR/locations/\f5\fIREGION\fR\fR/models/\f5\fIPARENT_MODEL_ID\fR\fR

.TP 2m

Region resource \- Cloud region to upload model. This represents a Cloud
resource. (NOTE) Some attributes are not given arguments in this group but can
be set in other ways.

To set the \f5project\fR attribute:
.RS 2m
.IP "\(em" 2m
provide the argument \f5\-\-region\fR on the command line with a fully specified
name;
.IP "\(em" 2m
set the property \f5ai/region\fR with a fully specified name;
.IP "\(em" 2m
choose one from the prompted list of available regions with a fully specified
name;
.IP "\(em" 2m
provide the argument \f5\-\-project\fR on the command line;
.IP "\(em" 2m
set the property \f5core/project\fR.
.RE
.sp


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

ID of the region or fully qualified identifier for the region.

To set the \f5region\fR attribute:
.RS 2m
.IP "\(em" 2m
provide the argument \f5\-\-region\fR on the command line;
.IP "\(em" 2m
set the property \f5ai/region\fR;
.IP "\(em" 2m
choose one from the prompted list of available regions.
.RE
.sp

.TP 2m
\fB\-\-smooth\-grad\-noise\-sigma\fR=\fISMOOTH_GRAD_NOISE_SIGMA\fR

Single float value used to add noise to all the features for explanation. Only
applicable to explanation method \f5integrated\-gradients\fR or \f5xrai\fR.

.TP 2m
\fB\-\-smooth\-grad\-noise\-sigma\-by\-feature\fR=[\fIKEY\fR=\fIVALUE\fR,...]

Noise sigma by features for explanation. Noise sigma represents the standard
deviation of the gaussian kernel that will be used to add noise to interpolated
inputs prior to computing gradients. Only applicable to explanation method
\f5integrated\-gradients\fR or \f5xrai\fR.

.TP 2m
\fB\-\-smooth\-grad\-noisy\-sample\-count\fR=\fISMOOTH_GRAD_NOISY_SAMPLE_COUNT\fR

Number of gradient samples used for approximation at explanation. Only
applicable to explanation method \f5integrated\-gradients\fR or \f5xrai\fR.

.TP 2m
\fB\-\-version\-aliases\fR=[\fIVERSION_ALIASES\fR,...]

Aliases used to reference a model version instead of auto\-generated version ID.
The aliases mentioned in the flag will replace the aliases set in the model.

.TP 2m
\fB\-\-version\-description\fR=\fIVERSION_DESCRIPTION\fR

Description of the model version.


.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 models upload
.RE

.RS 2m
$ gcloud beta ai models upload
.RE


