Skip to content

Commit 86471f8

Browse files
Google APIscopybara-github
authored andcommitted
feat: Tuning Checkpoints API
docs: fix links and typos PiperOrigin-RevId: 757839422
1 parent a04a5aa commit 86471f8

1 file changed

Lines changed: 56 additions & 13 deletions

File tree

google/cloud/aiplatform/v1beta1/tuning_job.proto

Lines changed: 56 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,8 @@ message TuningJob {
4343
};
4444

4545
oneof source_model {
46-
// The base model that is being tuned, e.g., "gemini-1.0-pro-002".
46+
// The base model that is being tuned. See [Supported
47+
// models](https://cloud.google.com/vertex-ai/generative-ai/docs/model-reference/tuning#supported_models).
4748
string base_model = 4;
4849
}
4950

@@ -54,7 +55,7 @@ message TuningJob {
5455
// Tuning Spec for Distillation.
5556
DistillationSpec distillation_spec = 17;
5657

57-
// Tuning Spec for open sourced and third party partner models.
58+
// Tuning Spec for open sourced and third party Partner models.
5859
PartnerModelTuningSpec partner_model_tuning_spec = 21;
5960
}
6061

@@ -125,7 +126,7 @@ message TuningJob {
125126
}
126127
];
127128

128-
// Output only. The tuned model resources assiociated with this
129+
// Output only. The tuned model resources associated with this
129130
// [TuningJob][google.cloud.aiplatform.v1.TuningJob].
130131
TunedModel tuned_model = 14 [(google.api.field_behavior) = OUTPUT_ONLY];
131132

@@ -159,7 +160,7 @@ message TuningJob {
159160
string service_account = 22;
160161
}
161162

162-
// The Model Registry Model and Online Prediction Endpoint assiociated with
163+
// The Model Registry Model and Online Prediction Endpoint associated with
163164
// this [TuningJob][google.cloud.aiplatform.v1.TuningJob].
164165
message TunedModel {
165166
// Output only. The resource name of the TunedModel. Format:
@@ -179,6 +180,12 @@ message TunedModel {
179180
type: "aiplatform.googleapis.com/Endpoint"
180181
}
181182
];
183+
184+
// Output only. The checkpoints associated with this TunedModel.
185+
// This field is only populated for tuning jobs that enable intermediate
186+
// checkpoints.
187+
repeated TunedModelCheckpoint checkpoints = 3
188+
[(google.api.field_behavior) = OUTPUT_ONLY];
182189
}
183190

184191
// Dataset distribution for Supervised Tuning.
@@ -262,13 +269,21 @@ message SupervisedTuningDataStats {
262269
repeated Content user_dataset_examples = 8
263270
[(google.api.field_behavior) = OUTPUT_ONLY];
264271

265-
// The number of examples in the dataset that have been truncated by any
266-
// amount.
267-
int64 total_truncated_example_count = 10;
272+
// Output only. The number of examples in the dataset that have been dropped.
273+
// An example can be dropped for reasons including: too many tokens, contains
274+
// an invalid image, contains too many images, etc.
275+
int64 total_truncated_example_count = 10
276+
[(google.api.field_behavior) = OUTPUT_ONLY];
277+
278+
// Output only. A partial sample of the indices (starting from 1) of the
279+
// dropped examples.
280+
repeated int64 truncated_example_indices = 11
281+
[(google.api.field_behavior) = OUTPUT_ONLY];
268282

269-
// A partial sample of the indices (starting from 1) of the truncated
270-
// examples.
271-
repeated int64 truncated_example_indices = 11;
283+
// Output only. For each index in `truncated_example_indices`, the user-facing
284+
// reason why the example was dropped.
285+
repeated string dropped_example_reasons = 12
286+
[(google.api.field_behavior) = OUTPUT_ONLY];
272287
}
273288

274289
// Distribution computed over a tuning dataset.
@@ -376,6 +391,9 @@ message SupervisedHyperParameters {
376391
// Adapter size 1.
377392
ADAPTER_SIZE_ONE = 1;
378393

394+
// Adapter size 2.
395+
ADAPTER_SIZE_TWO = 6;
396+
379397
// Adapter size 4.
380398
ADAPTER_SIZE_FOUR = 2;
381399

@@ -384,6 +402,9 @@ message SupervisedHyperParameters {
384402

385403
// Adapter size 16.
386404
ADAPTER_SIZE_SIXTEEN = 4;
405+
406+
// Adapter size 32.
407+
ADAPTER_SIZE_THIRTY_TWO = 5;
387408
}
388409

389410
// Optional. Number of complete passes the model makes over the entire
@@ -410,14 +431,20 @@ message SupervisedTuningSpec {
410431
// Optional. Hyperparameters for SFT.
411432
SupervisedHyperParameters hyper_parameters = 3
412433
[(google.api.field_behavior) = OPTIONAL];
434+
435+
// Optional. If set to true, disable intermediate checkpoints for SFT and only
436+
// the last checkpoint will be exported. Otherwise, enable intermediate
437+
// checkpoints for SFT. Default is false.
438+
bool export_last_checkpoint_only = 6 [(google.api.field_behavior) = OPTIONAL];
413439
}
414440

415441
// Tuning Spec for Distillation.
416442
message DistillationSpec {
417-
// The teacher model that is being distilled from, e.g., "gemini-1.0-pro-002".
443+
// The teacher model that is being distilled from. See [Supported
444+
// models](https://cloud.google.com/vertex-ai/generative-ai/docs/model-reference/tuning#supported_models).
418445
oneof teacher_model {
419-
// The base teacher model that is being distilled, e.g.,
420-
// "gemini-1.0-pro-002".
446+
// The base teacher model that is being distilled. See [Supported
447+
// models](https://cloud.google.com/vertex-ai/generative-ai/docs/model-reference/tuning#supported_models).
421448
string base_teacher_model = 5;
422449

423450
// The resource name of the Tuned teacher model. Format:
@@ -501,3 +528,19 @@ message TunedModelRef {
501528
}];
502529
}
503530
}
531+
532+
// TunedModelCheckpoint for the Tuned Model of a Tuning Job.
533+
message TunedModelCheckpoint {
534+
// The ID of the checkpoint.
535+
string checkpoint_id = 1;
536+
537+
// The epoch of the checkpoint.
538+
int64 epoch = 2;
539+
540+
// The step of the checkpoint.
541+
int64 step = 3;
542+
543+
// The Endpoint resource name that the checkpoint is deployed to. Format:
544+
// `projects/{project}/locations/{location}/endpoints/{endpoint}`.
545+
string endpoint = 4;
546+
}

0 commit comments

Comments
 (0)