Google Cloud Ai Platform V1 Client - Class TuningJob (1.16.0)

Reference documentation and code samples for the Google Cloud Ai Platform V1 Client class TuningJob.

Represents a TuningJob that runs with Google owned models.

Generated from protobuf message google.cloud.aiplatform.v1.TuningJob

Namespace

Google \ Cloud \ AIPlatform \ V1

Methods

__construct

Constructor.

Parameters
Name
Description
data
array

Optional. Data for populating the Message object.

↳ base_model
string

The base model that is being tuned, e.g., "gemini-1.0-pro-002".

↳ supervised_tuning_spec
SupervisedTuningSpec

Tuning Spec for Supervised Fine Tuning.

↳ name
string

Output only. Identifier. Resource name of a TuningJob. Format: projects/{project}/locations/{location}/tuningJobs/{tuning_job}

↳ tuned_model_display_name
string

Optional. The display name of the TunedModel . The name can be up to 128 characters long and can consist of any UTF-8 characters.

↳ description
string

Optional. The description of the TuningJob .

↳ state
int

Output only. The detailed state of the job.

↳ create_time
Google\Protobuf\Timestamp

Output only. Time when the TuningJob was created.

↳ start_time
Google\Protobuf\Timestamp

Output only. Time when the TuningJob for the first time entered the JOB_STATE_RUNNING state.

↳ end_time
Google\Protobuf\Timestamp

Output only. Time when the TuningJob entered any of the following JobStates : JOB_STATE_SUCCEEDED , JOB_STATE_FAILED , JOB_STATE_CANCELLED , JOB_STATE_EXPIRED .

↳ update_time
Google\Protobuf\Timestamp

Output only. Time when the TuningJob was most recently updated.

↳ error
Google\Rpc\Status

Output only. Only populated when job's state is JOB_STATE_FAILED or JOB_STATE_CANCELLED .

↳ labels
array| Google\Protobuf\Internal\MapField

Optional. The labels with user-defined metadata to organize TuningJob and generated resources such as Model and Endpoint . 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.

↳ experiment
string

Output only. The Experiment associated with this TuningJob .

↳ tuned_model
TunedModel

Output only. The tuned model resources assiociated with this TuningJob .

↳ tuning_data_stats
TuningDataStats

Output only. The tuning data statistics associated with this TuningJob .

↳ encryption_spec
EncryptionSpec

Customer-managed encryption key options for a TuningJob. If this is set, then all resources created by the TuningJob will be encrypted with the provided encryption key.

↳ service_account
string

The service account that the tuningJob workload runs as. If not specified, the Vertex AI Secure Fine-Tuned Service Agent in the project will be used. See https://cloud.google.com/iam/docs/service-agents#vertex-ai-secure-fine-tuning-service-agent Users starting the pipeline must have the iam.serviceAccounts.actAs permission on this service account.

getBaseModel

The base model that is being tuned, e.g., "gemini-1.0-pro-002".

Returns
Type
Description
string

hasBaseModel

setBaseModel

The base model that is being tuned, e.g., "gemini-1.0-pro-002".

Parameter
Name
Description
var
string
Returns
Type
Description
$this

getSupervisedTuningSpec

Tuning Spec for Supervised Fine Tuning.

Returns
Type
Description

hasSupervisedTuningSpec

setSupervisedTuningSpec

Tuning Spec for Supervised Fine Tuning.

Parameter
Name
Description
Returns
Type
Description
$this

getName

Output only. Identifier. Resource name of a TuningJob. Format: projects/{project}/locations/{location}/tuningJobs/{tuning_job}

Returns
Type
Description
string

setName

Output only. Identifier. Resource name of a TuningJob. Format: projects/{project}/locations/{location}/tuningJobs/{tuning_job}

Parameter
Name
Description
var
string
Returns
Type
Description
$this

getTunedModelDisplayName

Optional. The display name of the TunedModel . The name can be up to 128 characters long and can consist of any UTF-8 characters.

Returns
Type
Description
string

setTunedModelDisplayName

Optional. The display name of the TunedModel . The name can be up to 128 characters long and can consist of any UTF-8 characters.

Parameter
Name
Description
var
string
Returns
Type
Description
$this

getDescription

Optional. The description of the TuningJob .

Returns
Type
Description
string

setDescription

Optional. The description of the TuningJob .

Parameter
Name
Description
var
string
Returns
Type
Description
$this

getState

Output only. The detailed state of the job.

Returns
Type
Description
int

setState

Output only. The detailed state of the job.

Parameter
Name
Description
var
int
Returns
Type
Description
$this

getCreateTime

Output only. Time when the TuningJob was created.

Returns
Type
Description

hasCreateTime

clearCreateTime

setCreateTime

Output only. Time when the TuningJob was created.

Parameter
Name
Description
Returns
Type
Description
$this

getStartTime

Output only. Time when the TuningJob for the first time entered the JOB_STATE_RUNNING state.

Returns
Type
Description

hasStartTime

clearStartTime

setStartTime

Output only. Time when the TuningJob for the first time entered the JOB_STATE_RUNNING state.

Parameter
Name
Description
Returns
Type
Description
$this

getEndTime

Output only. Time when the TuningJob entered any of the following JobStates : JOB_STATE_SUCCEEDED , JOB_STATE_FAILED , JOB_STATE_CANCELLED , JOB_STATE_EXPIRED .

Returns
Type
Description

hasEndTime

clearEndTime

setEndTime

Output only. Time when the TuningJob entered any of the following JobStates : JOB_STATE_SUCCEEDED , JOB_STATE_FAILED , JOB_STATE_CANCELLED , JOB_STATE_EXPIRED .

Parameter
Name
Description
Returns
Type
Description
$this

getUpdateTime

Output only. Time when the TuningJob was most recently updated.

Returns
Type
Description

hasUpdateTime

clearUpdateTime

setUpdateTime

Output only. Time when the TuningJob was most recently updated.

Parameter
Name
Description
Returns
Type
Description
$this

getError

Output only. Only populated when job's state is JOB_STATE_FAILED or JOB_STATE_CANCELLED .

Returns
Type
Description

hasError

clearError

setError

Output only. Only populated when job's state is JOB_STATE_FAILED or JOB_STATE_CANCELLED .

Parameter
Name
Description
Returns
Type
Description
$this

getLabels

Optional. The labels with user-defined metadata to organize TuningJob and generated resources such as Model and Endpoint .

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.

Returns
Type
Description

setLabels

Optional. The labels with user-defined metadata to organize TuningJob and generated resources such as Model and Endpoint .

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.

Parameter
Name
Description
Returns
Type
Description
$this

getExperiment

Output only. The Experiment associated with this TuningJob .

Returns
Type
Description
string

setExperiment

Output only. The Experiment associated with this TuningJob .

Parameter
Name
Description
var
string
Returns
Type
Description
$this

getTunedModel

Output only. The tuned model resources assiociated with this TuningJob .

Returns
Type
Description
TunedModel |null

hasTunedModel

clearTunedModel

setTunedModel

Output only. The tuned model resources assiociated with this TuningJob .

Parameter
Name
Description
Returns
Type
Description
$this

getTuningDataStats

Output only. The tuning data statistics associated with this TuningJob .

Returns
Type
Description

hasTuningDataStats

clearTuningDataStats

setTuningDataStats

Output only. The tuning data statistics associated with this TuningJob .

Parameter
Name
Description
Returns
Type
Description
$this

getEncryptionSpec

Customer-managed encryption key options for a TuningJob. If this is set, then all resources created by the TuningJob will be encrypted with the provided encryption key.

Returns
Type
Description

hasEncryptionSpec

clearEncryptionSpec

setEncryptionSpec

Customer-managed encryption key options for a TuningJob. If this is set, then all resources created by the TuningJob will be encrypted with the provided encryption key.

Parameter
Name
Description
Returns
Type
Description
$this

getServiceAccount

The service account that the tuningJob workload runs as.

If not specified, the Vertex AI Secure Fine-Tuned Service Agent in the project will be used. See https://cloud.google.com/iam/docs/service-agents#vertex-ai-secure-fine-tuning-service-agent Users starting the pipeline must have the iam.serviceAccounts.actAs permission on this service account.

Returns
Type
Description
string

setServiceAccount

The service account that the tuningJob workload runs as.

If not specified, the Vertex AI Secure Fine-Tuned Service Agent in the project will be used. See https://cloud.google.com/iam/docs/service-agents#vertex-ai-secure-fine-tuning-service-agent Users starting the pipeline must have the iam.serviceAccounts.actAs permission on this service account.

Parameter
Name
Description
var
string
Returns
Type
Description
$this

getSourceModel

Returns
Type
Description
string

getTuningSpec

Returns
Type
Description
string
Design a Mobile Site
View Site in Mobile | Classic
Share by: