Skip to content

Commit e051a96

Browse files
Frances Hubis Thomacopybara-github
authored andcommitted
feat: Integration with Vertex AI Multimodal Datasets: Update train_dataset and validation_dataset in sft.train() docstring to include the Vertex Multimodal Dataset as a dataset source option.
PiperOrigin-RevId: 761584492
1 parent 9427b15 commit e051a96

File tree

3 files changed

+6
-17
lines changed

3 files changed

+6
-17
lines changed

google/cloud/aiplatform_v1/types/tuning_job.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -529,13 +529,9 @@ class SupervisedTuningSpec(proto.Message):
529529
530530
Attributes:
531531
training_dataset_uri (str):
532-
Required. Cloud Storage path to file
533-
containing training dataset for tuning. The
534-
dataset must be formatted as a JSONL file.
532+
Required. Training dataset used for tuning. The dataset can be specified as either a Cloud Storage path to a JSONL file or as the resource name of a Vertex Multimodal Dataset.
535533
validation_dataset_uri (str):
536-
Optional. Cloud Storage path to file
537-
containing validation dataset for tuning. The
538-
dataset must be formatted as a JSONL file.
534+
Optional. Validation dataset used for tuning. The dataset can be specified as either a Cloud Storage path to a JSONL file or as the resource name of a Vertex Multimodal Dataset.
539535
hyper_parameters (google.cloud.aiplatform_v1.types.SupervisedHyperParameters):
540536
Optional. Hyperparameters for SFT.
541537
export_last_checkpoint_only (bool):

google/cloud/aiplatform_v1beta1/types/tuning_job.py

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -764,14 +764,9 @@ class SupervisedTuningSpec(proto.Message):
764764
765765
Attributes:
766766
training_dataset_uri (str):
767-
Required. Cloud Storage path to file
768-
containing training dataset for tuning. The
769-
dataset must be formatted as a JSONL file.
767+
Required. Training dataset used for tuning. The dataset can be specified as either a Cloud Storage path to a JSONL file or as the resource name of a Vertex Multimodal Dataset.
770768
validation_dataset_uri (str):
771-
Optional. Cloud Storage path to file
772-
containing validation dataset for tuning. The
773-
dataset must be formatted as a JSONL file.
774-
hyper_parameters (google.cloud.aiplatform_v1beta1.types.SupervisedHyperParameters):
769+
Optional. Validation dataset used for tuning. The dataset can be specified as either a Cloud Storage path to a JSONL file or as the resource name of a Vertex Multimodal Dataset.a1.types.SupervisedHyperParameters):
775770
Optional. Hyperparameters for SFT.
776771
export_last_checkpoint_only (bool):
777772
Optional. If set to true, disable

vertexai/tuning/_supervised_tuning.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,8 @@ def train(
3838
3939
Args:
4040
source_model (str): Model name for tuning, e.g., "gemini-1.0-pro-002".
41-
train_dataset: Cloud Storage path to file containing training dataset for
42-
tuning. The dataset should be in JSONL format.
43-
validation_dataset: Cloud Storage path to file containing validation
44-
dataset for tuning. The dataset should be in JSONL format.
41+
train_dataset: Training dataset used for tuning. The dataset can be specified as either a Cloud Storage path to a JSONL file or as the resource name of a Vertex Multimodal Dataset.
42+
validation_dataset: Validation dataset used for tuning. The dataset can be specified as either a Cloud Storage path to a JSONL file or as the resource name of a Vertex Multimodal Dataset.
4543
tuned_model_display_name: The display name of the
4644
[TunedModel][google.cloud.aiplatform.v1.Model]. The name can be up to
4745
128 characters long and can consist of any UTF-8 characters.

0 commit comments

Comments
 (0)