- NAME
-
- gcloud ai hp-tuning-jobs create - create a hyperparameter tuning job
- SYNOPSIS
-
-
gcloud ai hp-tuning-jobs create
--config
=CONFIG
--display-name
=DISPLAY_NAME
[--algorithm
=ALGORITHM
] [--enable-dashboard-access
] [--enable-web-access
] [--labels
=[KEY
=VALUE
,…]] [--max-trial-count
=MAX_TRIAL_COUNT
] [--network
=NETWORK
] [--parallel-trial-count
=PARALLEL_TRIAL_COUNT
] [--region
=REGION
] [--service-account
=SERVICE_ACCOUNT
] [--kms-key
=KMS_KEY
:--kms-keyring
=KMS_KEYRING
--kms-location
=KMS_LOCATION
--kms-project
=KMS_PROJECT
] [GCLOUD_WIDE_FLAG …
]
-
- DESCRIPTION
- Create a hyperparameter tuning job.
- EXAMPLES
-
To create a job named
under projecttest
in regionexample
, run:us-central1
gcloud ai hp-tuning-jobs create --region=us-central1 --project=example --config=config.yaml --display-name=test
- REQUIRED FLAGS
-
--config
=CONFIG
-
Path to the job configuration file. This file should be a YAML document
containing a HyperparameterTuningSpec. If an option is specified both in the
configuration file **and** via command line arguments, the command line
arguments override the configuration file.
Example(YAML):
displayName: TestHpTuningJob maxTrialCount: 1 parallelTrialCount: 1 studySpec: metrics: - metricId: x goal: MINIMIZE parameters: - parameterId: z integerValueSpec: minValue: 1 maxValue: 100 algorithm: RANDOM_SEARCH trialJobSpec: workerPoolSpecs: - machineSpec: machineType: n1-standard-4 replicaCount: 1 containerSpec: imageUri: gcr.io/ucaip-test/ucaip-training-test
--display-name
=DISPLAY_NAME
- Display name of the hyperparameter tuning job to create.
- OPTIONAL FLAGS
-
--algorithm
=ALGORITHM
-
Search algorithm specified for the given study.
ALGORITHM
must be one of:algorithm-unspecified
,grid-search
,random-search
. --enable-dashboard-access
-
Whether you want Vertex AI to enable dashboard built on the training containers.
If set to
, you can access the dashboard at the URIs given by CustomJob.web_access_uris or Trial.web_access_uris (within HyperparameterTuningJob.trials).true
--enable-web-access
-
Whether you want Vertex AI to enable interactive
shell access to training containers. If set to
, you can access interactive shells at the URIs given by CustomJob.web_access_uris or Trial.web_access_uris (within HyperparameterTuningJob.trials).true
--labels
=[KEY
=VALUE
,…]-
List of label KEY=VALUE pairs to add.
Keys must start with a lowercase character and contain only hyphens (
-
), underscores (_
), lowercase characters, and numbers. Values must contain only hyphens (-
), underscores (_
), lowercase characters, and numbers. --max-trial-count
=MAX_TRIAL_COUNT
- Desired total number of trials. The default value is 1.
--network
=NETWORK
- Full name of the Google Compute Engine network to which the Job is peered with. Private services access must already have been configured. If unspecified, the Job is not peered with any network.
--parallel-trial-count
=PARALLEL_TRIAL_COUNT
- Desired number of Trials to run in parallel. The default value is 1.
-
Region resource - Cloud region to create a hyperparameter tuning job. 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
project
attribute:-
provide the argument
--region
on the command line with a fully specified name; -
set the property
ai/region
with a fully specified name; - choose one from the prompted list of available regions with a fully specified name;
-
provide the argument
--project
on the command line; -
set the property
core/project
.
--region
=REGION
-
ID of the region or fully qualified identifier for the region.
To set the
region
attribute:-
provide the argument
--region
on the command line; -
set the property
ai/region
; - choose one from the prompted list of available regions.
-
provide the argument
-
provide the argument
--service-account
=SERVICE_ACCOUNT
-
The email address of a service account to use when running the training
appplication. You must have the
iam.serviceAccounts.actAs
permission for the specified service account. -
Key resource - The Cloud KMS (Key Management Service) cryptokey that will be
used to protect the hyperparameter tuning job. The 'Vertex AI Service Agent'
service account must hold permission 'Cloud KMS CryptoKey Encrypter/Decrypter'.
The arguments in this group can be used to specify the attributes of this
resource.
--kms-key
=KMS_KEY
-
ID of the key or fully qualified identifier for the key.
To set the
kms-key
attribute:-
provide the argument
--kms-key
on the command line.
This flag argument must be specified if any of the other arguments in this group are specified.
-
provide the argument
--kms-keyring
=KMS_KEYRING
-
The KMS keyring of the key.
To set the
kms-keyring
attribute:-
provide the argument
--kms-key
on the command line with a fully specified name; -
provide the argument
--kms-keyring
on the command line.
-
provide the argument
--kms-location
=KMS_LOCATION
-
The Google Cloud location for the key.
To set the
kms-location
attribute:-
provide the argument
--kms-key
on the command line with a fully specified name; -
provide the argument
--kms-location
on the command line.
-
provide the argument
--kms-project
=KMS_PROJECT
-
The Google Cloud project for the key.
To set the
kms-project
attribute:-
provide the argument
--kms-key
on the command line with a fully specified name; -
provide the argument
--kms-project
on the command line; -
set the property
core/project
.
-
provide the argument
- 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
$ gcloud help
for details. - NOTES
-
These variants are also available:
gcloud alpha ai hp-tuning-jobs create
gcloud beta ai hp-tuning-jobs create
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-02-06 UTC.