Resource: TuningJob
Represents a TuningJob that runs with Google owned models.
name
string
Output only. Identifier. Resource name of a TuningJob. Format: projects/{project}/locations/{location}/tuningJobs/{tuningJob}
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.
description
string
Optional. The description of the TuningJob
.
Output only. The detailed state of the job.
Output only. time when the TuningJob
for the first time entered the JOB_STATE_RUNNING
state.
A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z"
and "2014-10-02T15:01:23.045123456Z"
.
Output only. time when the TuningJob entered any of the following JobStates
: JOB_STATE_SUCCEEDED
, JOB_STATE_FAILED
, JOB_STATE_CANCELLED
, JOB_STATE_EXPIRED
.
A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z"
and "2014-10-02T15:01:23.045123456Z"
.
Output only. Only populated when job's state is JOB_STATE_FAILED
or JOB_STATE_CANCELLED
.
labels
map (key: string, value: string)
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
.
Output only. The tuned model resources assiociated with this TuningJob
.
Output only. The tuning data statistics associated with this TuningJob
.
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.
source_model
Union type
source_model
can be only one of the following:baseModel
string
The base model that is being tuned, e.g., "gemini-1.0-pro-002". .
tuning_spec
Union type
tuning_spec
can be only one of the following:Tuning Spec for Supervised Fine Tuning.
JSON representation |
---|
{ "name": string, "tunedModelDisplayName": string, "description": string, "state": enum ( |
SupervisedTuningSpec
Tuning Spec for Supervised Tuning for first party models.
trainingDatasetUri
string
Required. Cloud Storage path to file containing training dataset for tuning. The dataset must be formatted as a JSONL file.
validationDatasetUri
string
Optional. Cloud Storage path to file containing validation dataset for tuning. The dataset must be formatted as a JSONL file.
Optional. Hyperparameters for SFT.
JSON representation |
---|
{
"trainingDatasetUri": string,
"validationDatasetUri": string,
"hyperParameters": {
object ( |
SupervisedHyperParameters
Hyperparameters for SFT.
Optional. Number of complete passes the model makes over the entire training dataset during training.
learningRateMultiplier
number
Optional. Multiplier for adjusting the default learning rate.
Optional. Adapter size for tuning.
JSON representation |
---|
{
"epochCount": string,
"learningRateMultiplier": number,
"adapterSize": enum ( |
AdapterSize
Supported adapter sizes for tuning.
Enums | |
---|---|
ADAPTER_SIZE_UNSPECIFIED |
Adapter size is unspecified. |
ADAPTER_SIZE_ONE |
Adapter size 1. |
ADAPTER_SIZE_FOUR |
Adapter size 4. |
ADAPTER_SIZE_EIGHT |
Adapter size 8. |
ADAPTER_SIZE_SIXTEEN |
Adapter size 16. |
ADAPTER_SIZE_THIRTY_TWO |
Adapter size 32. |
TunedModel
The Model Registry Model and Online Prediction Endpoint assiociated with this TuningJob
.
model
string
Output only. The resource name of the TunedModel. Format: projects/{project}/locations/{location}/models/{model}
.
endpoint
string
Output only. A resource name of an Endpoint. Format: projects/{project}/locations/{location}/endpoints/{endpoint}
.
JSON representation |
---|
{ "model": string, "endpoint": string } |
TuningDataStats
The tuning data statistic values for TuningJob
.
tuning_data_stats
Union type
tuning_data_stats
can be only one of the following:The SFT Tuning data stats.
JSON representation |
---|
{
// tuning_data_stats
"supervisedTuningDataStats": {
object ( |
SupervisedTuningDataStats
Tuning data statistics for Supervised Tuning.
Output only. Number of examples in the tuning dataset.
Output only. Number of tuning characters in the tuning dataset.
Output only. Number of billable characters in the tuning dataset.
Output only. Number of billable tokens in the tuning dataset.
Output only. Number of tuning steps for this Tuning Job.
Output only. Dataset distributions for the user input tokens.
Output only. Dataset distributions for the user output tokens.
Output only. Dataset distributions for the messages per example.
Output only. Sample user messages in the training dataset uri.
JSON representation |
---|
{ "tuningDatasetExampleCount": string, "totalTuningCharacterCount": string, "totalBillableCharacterCount": string, "totalBillableTokenCount": string, "tuningStepCount": string, "userInputTokenDistribution": { object ( |
SupervisedTuningDatasetDistribution
Dataset distribution for Supervised Tuning.
Output only. Sum of a given population of values.
Output only. Sum of a given population of values that are billable.
min
number
Output only. The minimum of the population values.
max
number
Output only. The maximum of the population values.
mean
number
Output only. The arithmetic mean of the values in the population.
median
number
Output only. The median of the values in the population.
p5
number
Output only. The 5th percentile of the values in the population.
p95
number
Output only. The 95th percentile of the values in the population.
Output only. Defines the histogram bucket.
JSON representation |
---|
{
"sum": string,
"billableSum": string,
"min": number,
"max": number,
"mean": number,
"median": number,
"p5": number,
"p95": number,
"buckets": [
{
object ( |
DatasetBucket
Dataset bucket used to create a histogram for the distribution given a population of values.
count
number
Output only. Number of values in the bucket.
left
number
Output only. left bound of the bucket.
right
number
Output only. Right bound of the bucket.
JSON representation |
---|
{ "count": number, "left": number, "right": number } |
Content
The base structured datatype containing multi-part content of a message.
A Content
includes a role
field designating the producer of the Content
and a parts
field containing multi-part data that contains the content of the message turn.
role
string
Optional. The producer of the content. Must be either 'user' or 'model'.
Useful to set for multi-turn conversations, otherwise can be left blank or unset.
Required. Ordered Parts
that constitute a single message. Parts may have different IANA MIME types.
JSON representation |
---|
{
"role": string,
"parts": [
{
object ( |
Part
A datatype containing media that is part of a multi-part Content
message.
A Part
consists of data which has an associated datatype. A Part
can only contain one of the accepted types in Part.data
.
A Part
must have a fixed IANA MIME type identifying the type and subtype of the media if inlineData
or fileData
field is filled with raw bytes.
data
Union type
data
can be only one of the following:text
string
Optional. Text part (can be code).
Optional. Inlined bytes data.
Optional. URI based data.
Optional. A predicted [FunctionCall] returned from the model that contains a string representing the [FunctionDeclaration.name] with the parameters and their values.
Optional. The result output of a [FunctionCall] that contains a string representing the [FunctionDeclaration.name] and a structured JSON object containing any output from the function call. It is used as context to the model.
metadata
Union type
metadata
can be only one of the following:Optional. Video metadata. The metadata should only be specified while the video data is presented in inlineData or fileData.
JSON representation |
---|
{ // data "text": string, "inlineData": { object ( |
Blob
FileData
URI based data.
mimeType
string
Required. The IANA standard MIME type of the source data.
fileUri
string
Required. URI.
JSON representation |
---|
{ "mimeType": string, "fileUri": string } |
FunctionCall
A predicted [FunctionCall] returned from the model that contains a string representing the [FunctionDeclaration.name] and a structured JSON object containing the parameters and their values.
name
string
Required. The name of the function to call. Matches [FunctionDeclaration.name].
Optional. Required. The function parameters and values in JSON object format. See [FunctionDeclaration.parameters] for parameter details.
JSON representation |
---|
{ "name": string, "args": { object } } |
FunctionResponse
The result output from a [FunctionCall] that contains a string representing the [FunctionDeclaration.name] and a structured JSON object containing any output from the function is used as context to the model. This should contain the result of a [FunctionCall] made based on model prediction.
name
string
Required. The name of the function to call. Matches [FunctionDeclaration.name] and [FunctionCall.name].
Required. The function response in JSON object format. Use "output" key to specify function output and "error" key to specify error details (if any). If "output" and "error" keys are not specified, then whole "response" is treated as function output.
JSON representation |
---|
{ "name": string, "response": { object } } |
VideoMetadata
metadata describes the input video content.
Optional. The start offset of the video.
A duration in seconds with up to nine fractional digits, ending with 's
'. Example: "3.5s"
.
Optional. The end offset of the video.
A duration in seconds with up to nine fractional digits, ending with 's
'. Example: "3.5s"
.
JSON representation |
---|
{ "startOffset": string, "endOffset": string } |
Methods |
|
---|---|
|
Cancels a TuningJob. |
|
Creates a TuningJob. |
|
Gets a TuningJob. |
|
Lists TuningJobs in a Location. |
|
Rebase a TunedModel. |