tuning_jobs
Creates, updates, deletes, gets or lists a tuning_jobs resource.
Overview
| Name | tuning_jobs |
| Type | Resource |
| Id | google.aiplatform.tuning_jobs |
Fields
The following fields are returned by SELECT queries:
- get
- list
| Name | Datatype | Description |
|---|---|---|
name | string | Output only. Identifier. Resource name of a TuningJob. Format: projects/{project}/locations/{location}/tuningJobs/{tuning_job} |
baseModel | string | The base model that is being tuned. See Supported models. |
createTime | string (google-datetime) | Output only. Time when the TuningJob was created. |
description | string | Optional. The description of the TuningJob. |
encryptionSpec | object | 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. (id: GoogleCloudAiplatformV1EncryptionSpec) |
endTime | string (google-datetime) | Output only. Time when the TuningJob entered any of the following JobStates: JOB_STATE_SUCCEEDED, JOB_STATE_FAILED, JOB_STATE_CANCELLED, JOB_STATE_EXPIRED. |
error | object | The Status type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by gRPC. Each Status message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the API Design Guide. (id: GoogleRpcStatus) |
evaluateDatasetRuns | array | Output only. Evaluation runs for the Tuning Job. |
experiment | string | Output only. The Experiment associated with this TuningJob. |
labels | object | 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. |
preTunedModel | object | The pre-tuned model for continuous tuning. (id: GoogleCloudAiplatformV1PreTunedModel) |
preferenceOptimizationSpec | object | Tuning Spec for Preference Optimization. (id: GoogleCloudAiplatformV1PreferenceOptimizationSpec) |
serviceAccount | 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. |
startTime | string (google-datetime) | Output only. Time when the TuningJob for the first time entered the JOB_STATE_RUNNING state. |
state | string | Output only. The detailed state of the job. (JOB_STATE_UNSPECIFIED, JOB_STATE_QUEUED, JOB_STATE_PENDING, JOB_STATE_RUNNING, JOB_STATE_SUCCEEDED, JOB_STATE_FAILED, JOB_STATE_CANCELLING, JOB_STATE_CANCELLED, JOB_STATE_PAUSED, JOB_STATE_EXPIRED, JOB_STATE_UPDATING, JOB_STATE_PARTIALLY_SUCCEEDED) |
supervisedTuningSpec | object | Tuning Spec for Supervised Fine Tuning. (id: GoogleCloudAiplatformV1SupervisedTuningSpec) |
tunedModel | object | Output only. The tuned model resources associated with this TuningJob. (id: GoogleCloudAiplatformV1TunedModel) |
tunedModelDisplayName | 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. For continuous tuning, tuned_model_display_name will by default use the same display name as the pre-tuned model. If a new display name is provided, the tuning job will create a new model instead of a new version. |
tuningDataStats | object | Output only. The tuning data statistics associated with this TuningJob. (id: GoogleCloudAiplatformV1TuningDataStats) |
updateTime | string (google-datetime) | Output only. Time when the TuningJob was most recently updated. |
| Name | Datatype | Description |
|---|---|---|
name | string | Output only. Identifier. Resource name of a TuningJob. Format: projects/{project}/locations/{location}/tuningJobs/{tuning_job} |
baseModel | string | The base model that is being tuned. See Supported models. |
createTime | string (google-datetime) | Output only. Time when the TuningJob was created. |
description | string | Optional. The description of the TuningJob. |
encryptionSpec | object | 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. (id: GoogleCloudAiplatformV1EncryptionSpec) |
endTime | string (google-datetime) | Output only. Time when the TuningJob entered any of the following JobStates: JOB_STATE_SUCCEEDED, JOB_STATE_FAILED, JOB_STATE_CANCELLED, JOB_STATE_EXPIRED. |
error | object | The Status type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by gRPC. Each Status message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the API Design Guide. (id: GoogleRpcStatus) |
evaluateDatasetRuns | array | Output only. Evaluation runs for the Tuning Job. |
experiment | string | Output only. The Experiment associated with this TuningJob. |
labels | object | 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. |
preTunedModel | object | The pre-tuned model for continuous tuning. (id: GoogleCloudAiplatformV1PreTunedModel) |
preferenceOptimizationSpec | object | Tuning Spec for Preference Optimization. (id: GoogleCloudAiplatformV1PreferenceOptimizationSpec) |
serviceAccount | 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. |
startTime | string (google-datetime) | Output only. Time when the TuningJob for the first time entered the JOB_STATE_RUNNING state. |
state | string | Output only. The detailed state of the job. (JOB_STATE_UNSPECIFIED, JOB_STATE_QUEUED, JOB_STATE_PENDING, JOB_STATE_RUNNING, JOB_STATE_SUCCEEDED, JOB_STATE_FAILED, JOB_STATE_CANCELLING, JOB_STATE_CANCELLED, JOB_STATE_PAUSED, JOB_STATE_EXPIRED, JOB_STATE_UPDATING, JOB_STATE_PARTIALLY_SUCCEEDED) |
supervisedTuningSpec | object | Tuning Spec for Supervised Fine Tuning. (id: GoogleCloudAiplatformV1SupervisedTuningSpec) |
tunedModel | object | Output only. The tuned model resources associated with this TuningJob. (id: GoogleCloudAiplatformV1TunedModel) |
tunedModelDisplayName | 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. For continuous tuning, tuned_model_display_name will by default use the same display name as the pre-tuned model. If a new display name is provided, the tuning job will create a new model instead of a new version. |
tuningDataStats | object | Output only. The tuning data statistics associated with this TuningJob. (id: GoogleCloudAiplatformV1TuningDataStats) |
updateTime | string (google-datetime) | Output only. Time when the TuningJob was most recently updated. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | projectsId, locationsId, tuningJobsId | Gets a tuning job. | |
list | select | projectsId, locationsId | pageToken, filter, pageSize | Lists tuning jobs in a location. |
create | insert | projectsId, locationsId | Creates a tuning job. A created tuning job will be subsequently executed to start the model tuning process. | |
rebase_tuned_model | exec | projectsId, locationsId | Rebase a tuned model. A rebase operation takes a model that was previously tuned on a base model version, and retunes it on a new base model version. The rebase operation creates a new tuning job and a new tuned model. | |
cancel | exec | projectsId, locationsId, tuningJobsId | Cancels a tuning job. Starts an asynchronous cancellation request. The server makes a best effort to cancel the job, but success is not guaranteed. Clients can use GenAiTuningService.GetTuningJob or other methods to check whether the cancellation succeeded or whether the job completed despite cancellation. On successful cancellation, the tuning job is not deleted. Instead, its state is set to CANCELLED, and error is set to a status with a google.rpc.Status.code of 1, corresponding to Code.CANCELLED. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
locationsId | string | |
projectsId | string | |
tuningJobsId | string | |
filter | string | |
pageSize | integer (int32) | |
pageToken | string |
SELECT examples
- get
- list
Gets a tuning job.
SELECT
name,
baseModel,
createTime,
description,
encryptionSpec,
endTime,
error,
evaluateDatasetRuns,
experiment,
labels,
preTunedModel,
preferenceOptimizationSpec,
serviceAccount,
startTime,
state,
supervisedTuningSpec,
tunedModel,
tunedModelDisplayName,
tuningDataStats,
updateTime
FROM google.aiplatform.tuning_jobs
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND tuningJobsId = '{{ tuningJobsId }}' -- required
;
Lists tuning jobs in a location.
SELECT
name,
baseModel,
createTime,
description,
encryptionSpec,
endTime,
error,
evaluateDatasetRuns,
experiment,
labels,
preTunedModel,
preferenceOptimizationSpec,
serviceAccount,
startTime,
state,
supervisedTuningSpec,
tunedModel,
tunedModelDisplayName,
tuningDataStats,
updateTime
FROM google.aiplatform.tuning_jobs
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND pageToken = '{{ pageToken }}'
AND filter = '{{ filter }}'
AND pageSize = '{{ pageSize }}'
;
INSERT examples
- create
- Manifest
Creates a tuning job. A created tuning job will be subsequently executed to start the model tuning process.
INSERT INTO google.aiplatform.tuning_jobs (
data__tunedModelDisplayName,
data__description,
data__baseModel,
data__labels,
data__supervisedTuningSpec,
data__encryptionSpec,
data__preferenceOptimizationSpec,
data__preTunedModel,
data__serviceAccount,
projectsId,
locationsId
)
SELECT
'{{ tunedModelDisplayName }}',
'{{ description }}',
'{{ baseModel }}',
'{{ labels }}',
'{{ supervisedTuningSpec }}',
'{{ encryptionSpec }}',
'{{ preferenceOptimizationSpec }}',
'{{ preTunedModel }}',
'{{ serviceAccount }}',
'{{ projectsId }}',
'{{ locationsId }}'
RETURNING
name,
baseModel,
createTime,
description,
encryptionSpec,
endTime,
error,
evaluateDatasetRuns,
experiment,
labels,
preTunedModel,
preferenceOptimizationSpec,
serviceAccount,
startTime,
state,
supervisedTuningSpec,
tunedModel,
tunedModelDisplayName,
tuningDataStats,
updateTime
;
# Description fields are for documentation purposes
- name: tuning_jobs
props:
- name: projectsId
value: "{{ projectsId }}"
description: Required parameter for the tuning_jobs resource.
- name: locationsId
value: "{{ locationsId }}"
description: Required parameter for the tuning_jobs resource.
- name: tunedModelDisplayName
value: "{{ tunedModelDisplayName }}"
description: |
Optional. The display name of the TunedModel. The name can be up to 128 characters long and can consist of any UTF-8 characters. For continuous tuning, tuned_model_display_name will by default use the same display name as the pre-tuned model. If a new display name is provided, the tuning job will create a new model instead of a new version.
- name: description
value: "{{ description }}"
description: |
Optional. The description of the TuningJob.
- name: baseModel
value: "{{ baseModel }}"
description: |
The base model that is being tuned. See [Supported models](https://cloud.google.com/vertex-ai/generative-ai/docs/model-reference/tuning#supported_models).
- name: labels
value: "{{ labels }}"
description: |
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.
- name: supervisedTuningSpec
description: |
Tuning Spec for Supervised Fine Tuning.
value:
exportLastCheckpointOnly: {{ exportLastCheckpointOnly }}
validationDatasetUri: "{{ validationDatasetUri }}"
trainingDatasetUri: "{{ trainingDatasetUri }}"
evaluationConfig:
metrics:
- pointwiseMetricSpec:
metricPromptTemplate: "{{ metricPromptTemplate }}"
systemInstruction: "{{ systemInstruction }}"
customOutputFormatConfig:
returnRawOutput: {{ returnRawOutput }}
bleuSpec:
useEffectiveOrder: {{ useEffectiveOrder }}
rougeSpec:
useStemmer: {{ useStemmer }}
rougeType: "{{ rougeType }}"
splitSummaries: {{ splitSummaries }}
exactMatchSpec: "{{ exactMatchSpec }}"
computationBasedMetricSpec:
type: "{{ type }}"
parameters: "{{ parameters }}"
predefinedMetricSpec:
metricSpecName: "{{ metricSpecName }}"
metricSpecParameters: "{{ metricSpecParameters }}"
metadata:
otherMetadata: "{{ otherMetadata }}"
title: "{{ title }}"
scoreRange:
min: {{ min }}
step: {{ step }}
description: "{{ description }}"
max: {{ max }}
customCodeExecutionSpec:
evaluationFunction: "{{ evaluationFunction }}"
pairwiseMetricSpec:
systemInstruction: "{{ systemInstruction }}"
baselineResponseFieldName: "{{ baselineResponseFieldName }}"
candidateResponseFieldName: "{{ candidateResponseFieldName }}"
metricPromptTemplate: "{{ metricPromptTemplate }}"
customOutputFormatConfig:
returnRawOutput: {{ returnRawOutput }}
aggregationMetrics: "{{ aggregationMetrics }}"
llmBasedMetricSpec:
systemInstruction: "{{ systemInstruction }}"
judgeAutoraterConfig:
samplingCount: {{ samplingCount }}
flipEnabled: {{ flipEnabled }}
autoraterModel: "{{ autoraterModel }}"
generationConfig: "{{ generationConfig }}"
rubricGroupKey: "{{ rubricGroupKey }}"
resultParserConfig:
customCodeParserConfig: "{{ customCodeParserConfig }}"
predefinedRubricGenerationSpec:
metricSpecName: "{{ metricSpecName }}"
metricSpecParameters: "{{ metricSpecParameters }}"
metricPromptTemplate: "{{ metricPromptTemplate }}"
rubricGenerationSpec:
promptTemplate: "{{ promptTemplate }}"
modelConfig: "{{ modelConfig }}"
rubricTypeOntology: "{{ rubricTypeOntology }}"
rubricContentType: "{{ rubricContentType }}"
additionalConfig: "{{ additionalConfig }}"
inferenceGenerationConfig:
speechConfig:
languageCode: "{{ languageCode }}"
multiSpeakerVoiceConfig:
speakerVoiceConfigs: "{{ speakerVoiceConfigs }}"
voiceConfig:
replicatedVoiceConfig: "{{ replicatedVoiceConfig }}"
prebuiltVoiceConfig: "{{ prebuiltVoiceConfig }}"
seed: {{ seed }}
imageConfig:
personGeneration: "{{ personGeneration }}"
aspectRatio: "{{ aspectRatio }}"
imageSize: "{{ imageSize }}"
prominentPeople: "{{ prominentPeople }}"
imageOutputOptions:
compressionQuality: {{ compressionQuality }}
mimeType: "{{ mimeType }}"
audioTranscriptionConfig:
customVocabulary:
- "{{ customVocabulary }}"
languageHints:
languageCodes: "{{ languageCodes }}"
diarization: {{ diarization }}
adaptationPhrases:
- "{{ adaptationPhrases }}"
languageAuto: "{{ languageAuto }}"
wordTimestamp: {{ wordTimestamp }}
maxOutputTokens: {{ maxOutputTokens }}
responseModalities:
- "{{ responseModalities }}"
topP: {{ topP }}
responseJsonSchema: "{{ responseJsonSchema }}"
responseFormat:
- audio:
mimeType: "{{ mimeType }}"
bitRate: {{ bitRate }}
delivery: "{{ delivery }}"
sampleRate: {{ sampleRate }}
text:
mimeType: "{{ mimeType }}"
schema: "{{ schema }}"
image:
mimeType: "{{ mimeType }}"
delivery: "{{ delivery }}"
aspectRatio: "{{ aspectRatio }}"
imageSize: "{{ imageSize }}"
video:
delivery: "{{ delivery }}"
aspectRatio: "{{ aspectRatio }}"
gcsUri: "{{ gcsUri }}"
duration: "{{ duration }}"
thinkingConfig:
includeThoughts: {{ includeThoughts }}
thinkingLevel: "{{ thinkingLevel }}"
thinkingBudget: {{ thinkingBudget }}
enableAffectiveDialog: {{ enableAffectiveDialog }}
topK: {{ topK }}
logprobs: {{ logprobs }}
presencePenalty: {{ presencePenalty }}
candidateCount: {{ candidateCount }}
responseSchema:
ref: "{{ ref }}"
enum:
- "{{ enum }}"
minLength: "{{ minLength }}"
title: "{{ title }}"
minimum: {{ minimum }}
maxProperties: "{{ maxProperties }}"
properties: "{{ properties }}"
nullable: {{ nullable }}
example: "{{ example }}"
minProperties: "{{ minProperties }}"
type: "{{ type }}"
pattern: "{{ pattern }}"
additionalProperties: "{{ additionalProperties }}"
format: "{{ format }}"
propertyOrdering:
- "{{ propertyOrdering }}"
minItems: "{{ minItems }}"
maximum: {{ maximum }}
maxLength: "{{ maxLength }}"
items:
ref: "{{ ref }}"
enum: "{{ enum }}"
minLength: "{{ minLength }}"
title: "{{ title }}"
minimum: {{ minimum }}
maxProperties: "{{ maxProperties }}"
properties: "{{ properties }}"
nullable: {{ nullable }}
example: "{{ example }}"
minProperties: "{{ minProperties }}"
type: "{{ type }}"
pattern: "{{ pattern }}"
additionalProperties: "{{ additionalProperties }}"
format: "{{ format }}"
propertyOrdering: "{{ propertyOrdering }}"
minItems: "{{ minItems }}"
maximum: {{ maximum }}
maxLength: "{{ maxLength }}"
items: "{{ items }}"
description: "{{ description }}"
required: "{{ required }}"
maxItems: "{{ maxItems }}"
defs: "{{ defs }}"
anyOf: "{{ anyOf }}"
default: "{{ default }}"
description: "{{ description }}"
required:
- "{{ required }}"
maxItems: "{{ maxItems }}"
defs: "{{ defs }}"
anyOf:
- ref: "{{ ref }}"
enum: "{{ enum }}"
minLength: "{{ minLength }}"
title: "{{ title }}"
minimum: {{ minimum }}
maxProperties: "{{ maxProperties }}"
properties: "{{ properties }}"
nullable: {{ nullable }}
example: "{{ example }}"
minProperties: "{{ minProperties }}"
type: "{{ type }}"
pattern: "{{ pattern }}"
additionalProperties: "{{ additionalProperties }}"
format: "{{ format }}"
propertyOrdering: "{{ propertyOrdering }}"
minItems: "{{ minItems }}"
maximum: {{ maximum }}
maxLength: "{{ maxLength }}"
items:
ref: "{{ ref }}"
enum: "{{ enum }}"
minLength: "{{ minLength }}"
title: "{{ title }}"
minimum: {{ minimum }}
maxProperties: "{{ maxProperties }}"
properties: "{{ properties }}"
nullable: {{ nullable }}
example: "{{ example }}"
minProperties: "{{ minProperties }}"
type: "{{ type }}"
pattern: "{{ pattern }}"
additionalProperties: "{{ additionalProperties }}"
format: "{{ format }}"
propertyOrdering: "{{ propertyOrdering }}"
minItems: "{{ minItems }}"
maximum: {{ maximum }}
maxLength: "{{ maxLength }}"
items: "{{ items }}"
description: "{{ description }}"
required: "{{ required }}"
maxItems: "{{ maxItems }}"
defs: "{{ defs }}"
anyOf: "{{ anyOf }}"
default: "{{ default }}"
description: "{{ description }}"
required: "{{ required }}"
maxItems: "{{ maxItems }}"
defs: "{{ defs }}"
anyOf: "{{ anyOf }}"
default: "{{ default }}"
default: "{{ default }}"
routingConfig:
manualMode:
modelName: "{{ modelName }}"
autoMode:
modelRoutingPreference: "{{ modelRoutingPreference }}"
audioTimestamp: {{ audioTimestamp }}
temperature: {{ temperature }}
stopSequences:
- "{{ stopSequences }}"
responseLogprobs: {{ responseLogprobs }}
responseMimeType: "{{ responseMimeType }}"
mediaResolution: "{{ mediaResolution }}"
frequencyPenalty: {{ frequencyPenalty }}
autoraterConfig:
samplingCount: {{ samplingCount }}
flipEnabled: {{ flipEnabled }}
autoraterModel: "{{ autoraterModel }}"
generationConfig:
speechConfig:
languageCode: "{{ languageCode }}"
multiSpeakerVoiceConfig: "{{ multiSpeakerVoiceConfig }}"
voiceConfig: "{{ voiceConfig }}"
seed: {{ seed }}
imageConfig:
personGeneration: "{{ personGeneration }}"
aspectRatio: "{{ aspectRatio }}"
imageSize: "{{ imageSize }}"
prominentPeople: "{{ prominentPeople }}"
imageOutputOptions: "{{ imageOutputOptions }}"
audioTranscriptionConfig:
customVocabulary: "{{ customVocabulary }}"
languageHints: "{{ languageHints }}"
diarization: {{ diarization }}
adaptationPhrases: "{{ adaptationPhrases }}"
languageAuto: "{{ languageAuto }}"
wordTimestamp: {{ wordTimestamp }}
maxOutputTokens: {{ maxOutputTokens }}
responseModalities:
- "{{ responseModalities }}"
topP: {{ topP }}
responseJsonSchema: "{{ responseJsonSchema }}"
responseFormat:
- audio:
mimeType: "{{ mimeType }}"
bitRate: {{ bitRate }}
delivery: "{{ delivery }}"
sampleRate: {{ sampleRate }}
text:
mimeType: "{{ mimeType }}"
schema: "{{ schema }}"
image:
mimeType: "{{ mimeType }}"
delivery: "{{ delivery }}"
aspectRatio: "{{ aspectRatio }}"
imageSize: "{{ imageSize }}"
video:
delivery: "{{ delivery }}"
aspectRatio: "{{ aspectRatio }}"
gcsUri: "{{ gcsUri }}"
duration: "{{ duration }}"
thinkingConfig:
includeThoughts: {{ includeThoughts }}
thinkingLevel: "{{ thinkingLevel }}"
thinkingBudget: {{ thinkingBudget }}
enableAffectiveDialog: {{ enableAffectiveDialog }}
topK: {{ topK }}
logprobs: {{ logprobs }}
presencePenalty: {{ presencePenalty }}
candidateCount: {{ candidateCount }}
responseSchema:
ref: "{{ ref }}"
enum: "{{ enum }}"
minLength: "{{ minLength }}"
title: "{{ title }}"
minimum: {{ minimum }}
maxProperties: "{{ maxProperties }}"
properties: "{{ properties }}"
nullable: {{ nullable }}
example: "{{ example }}"
minProperties: "{{ minProperties }}"
type: "{{ type }}"
pattern: "{{ pattern }}"
additionalProperties: "{{ additionalProperties }}"
format: "{{ format }}"
propertyOrdering: "{{ propertyOrdering }}"
minItems: "{{ minItems }}"
maximum: {{ maximum }}
maxLength: "{{ maxLength }}"
items: "{{ items }}"
description: "{{ description }}"
required: "{{ required }}"
maxItems: "{{ maxItems }}"
defs: "{{ defs }}"
anyOf: "{{ anyOf }}"
default: "{{ default }}"
routingConfig:
manualMode: "{{ manualMode }}"
autoMode: "{{ autoMode }}"
audioTimestamp: {{ audioTimestamp }}
temperature: {{ temperature }}
stopSequences:
- "{{ stopSequences }}"
responseLogprobs: {{ responseLogprobs }}
responseMimeType: "{{ responseMimeType }}"
mediaResolution: "{{ mediaResolution }}"
frequencyPenalty: {{ frequencyPenalty }}
outputConfig:
gcsDestination:
outputUriPrefix: "{{ outputUriPrefix }}"
datasetCustomMetrics:
- displayName: "{{ displayName }}"
aggregationFunction: "{{ aggregationFunction }}"
hyperParameters:
adapterSize: "{{ adapterSize }}"
epochCount: "{{ epochCount }}"
learningRateMultiplier: {{ learningRateMultiplier }}
- name: encryptionSpec
description: |
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.
value:
kmsKeyName: "{{ kmsKeyName }}"
- name: preferenceOptimizationSpec
description: |
Tuning Spec for Preference Optimization.
value:
hyperParameters:
adapterSize: "{{ adapterSize }}"
beta: {{ beta }}
epochCount: "{{ epochCount }}"
learningRateMultiplier: {{ learningRateMultiplier }}
validationDatasetUri: "{{ validationDatasetUri }}"
trainingDatasetUri: "{{ trainingDatasetUri }}"
exportLastCheckpointOnly: {{ exportLastCheckpointOnly }}
- name: preTunedModel
description: |
The pre-tuned model for continuous tuning.
value:
tunedModelName: "{{ tunedModelName }}"
checkpointId: "{{ checkpointId }}"
baseModel: "{{ baseModel }}"
- name: serviceAccount
value: "{{ serviceAccount }}"
description: |
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.
Lifecycle Methods
- rebase_tuned_model
- cancel
Rebase a tuned model. A rebase operation takes a model that was previously tuned on a base model version, and retunes it on a new base model version. The rebase operation creates a new tuning job and a new tuned model.
EXEC google.aiplatform.tuning_jobs.rebase_tuned_model
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required
@@json=
'{
"tuningJob": "{{ tuningJob }}",
"deployToSameEndpoint": {{ deployToSameEndpoint }},
"tunedModelRef": "{{ tunedModelRef }}",
"artifactDestination": "{{ artifactDestination }}"
}'
;
Cancels a tuning job. Starts an asynchronous cancellation request. The server makes a best effort to cancel the job, but success is not guaranteed. Clients can use GenAiTuningService.GetTuningJob or other methods to check whether the cancellation succeeded or whether the job completed despite cancellation. On successful cancellation, the tuning job is not deleted. Instead, its state is set to CANCELLED, and error is set to a status with a google.rpc.Status.code of 1, corresponding to Code.CANCELLED.
EXEC google.aiplatform.tuning_jobs.cancel
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@tuningJobsId='{{ tuningJobsId }}' --required
;