Class: Google::Apis::AiplatformV1beta1::GoogleCloudAiplatformV1beta1TuningJob

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/aiplatform_v1beta1/classes.rb,
lib/google/apis/aiplatform_v1beta1/representations.rb,
lib/google/apis/aiplatform_v1beta1/representations.rb

Overview

Represents a TuningJob that runs with Google owned models.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudAiplatformV1beta1TuningJob

Returns a new instance of GoogleCloudAiplatformV1beta1TuningJob.



64784
64785
64786
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 64784

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#base_modelString

The base model that is being tuned. See Supported models. Corresponds to the JSON property baseModel

Returns:

  • (String)


64587
64588
64589
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 64587

def base_model
  @base_model
end

#create_timeString

Output only. Time when the TuningJob was created. Corresponds to the JSON property createTime

Returns:

  • (String)


64592
64593
64594
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 64592

def create_time
  @create_time
end

#custom_base_modelString

Optional. The user-provided path to custom model weights. Set this field to tune a custom model. The path must be a Cloud Storage directory that contains the model weights in .safetensors format along with associated model metadata files. If this field is set, the base_model field must still be set to indicate which base model the custom model is derived from. This feature is only available for open source models. Corresponds to the JSON property customBaseModel

Returns:

  • (String)


64602
64603
64604
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 64602

def custom_base_model
  @custom_base_model
end

#descriptionString

Optional. The description of the TuningJob. Corresponds to the JSON property description

Returns:

  • (String)


64607
64608
64609
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 64607

def description
  @description
end

#distillation_specGoogle::Apis::AiplatformV1beta1::GoogleCloudAiplatformV1beta1DistillationSpec

Tuning Spec for Distillation. Corresponds to the JSON property distillationSpec



64612
64613
64614
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 64612

def distillation_spec
  @distillation_spec
end

#encryption_specGoogle::Apis::AiplatformV1beta1::GoogleCloudAiplatformV1beta1EncryptionSpec

Represents a customer-managed encryption key specification that can be applied to a Vertex AI resource. Corresponds to the JSON property encryptionSpec



64618
64619
64620
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 64618

def encryption_spec
  @encryption_spec
end

#end_timeString

Output only. Time when the TuningJob entered any of the following JobStates: JOB_STATE_SUCCEEDED, JOB_STATE_FAILED, JOB_STATE_CANCELLED, JOB_STATE_EXPIRED. Corresponds to the JSON property endTime

Returns:

  • (String)


64625
64626
64627
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 64625

def end_time
  @end_time
end

#errorGoogle::Apis::AiplatformV1beta1::GoogleRpcStatus

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. Corresponds to the JSON property error



64635
64636
64637
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 64635

def error
  @error
end

#evaluate_dataset_runsArray<Google::Apis::AiplatformV1beta1::GoogleCloudAiplatformV1beta1EvaluateDatasetRun>

Output only. Evaluation runs for the Tuning Job. Corresponds to the JSON property evaluateDatasetRuns



64640
64641
64642
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 64640

def evaluate_dataset_runs
  @evaluate_dataset_runs
end

#experimentString

Output only. The Experiment associated with this TuningJob. Corresponds to the JSON property experiment

Returns:

  • (String)


64645
64646
64647
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 64645

def experiment
  @experiment
end

#full_fine_tuning_specGoogle::Apis::AiplatformV1beta1::GoogleCloudAiplatformV1beta1FullFineTuningSpec

Tuning Spec for Full Fine Tuning. Corresponds to the JSON property fullFineTuningSpec



64650
64651
64652
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 64650

def full_fine_tuning_spec
  @full_fine_tuning_spec
end

#labelsHash<String,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. Corresponds to the JSON property labels

Returns:

  • (Hash<String,String>)


64660
64661
64662
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 64660

def labels
  @labels
end

#nameString

Output only. Identifier. Resource name of a TuningJob. Format: projects/ project/locations/location/tuningJobs/tuning_job` Corresponds to the JSON propertyname`

Returns:

  • (String)


64666
64667
64668
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 64666

def name
  @name
end

#output_uriString

Optional. Cloud Storage path to the directory where tuning job outputs are written to. This field is only available and required for open source models. Corresponds to the JSON property outputUri

Returns:

  • (String)


64672
64673
64674
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 64672

def output_uri
  @output_uri
end

#partner_model_tuning_specGoogle::Apis::AiplatformV1beta1::GoogleCloudAiplatformV1beta1PartnerModelTuningSpec

Tuning spec for Partner models. Corresponds to the JSON property partnerModelTuningSpec



64677
64678
64679
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 64677

def partner_model_tuning_spec
  @partner_model_tuning_spec
end

#pipeline_jobString

Output only. The resource name of the PipelineJob associated with the TuningJob. Format: projects/project/locations/location/pipelineJobs/ pipeline_job`. Corresponds to the JSON propertypipelineJob`

Returns:

  • (String)


64684
64685
64686
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 64684

def pipeline_job
  @pipeline_job
end

#pre_tuned_modelGoogle::Apis::AiplatformV1beta1::GoogleCloudAiplatformV1beta1PreTunedModel

A pre-tuned model for continuous tuning. Corresponds to the JSON property preTunedModel



64689
64690
64691
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 64689

def pre_tuned_model
  @pre_tuned_model
end

#preference_optimization_specGoogle::Apis::AiplatformV1beta1::GoogleCloudAiplatformV1beta1PreferenceOptimizationSpec

Tuning Spec for Preference Optimization. Corresponds to the JSON property preferenceOptimizationSpec



64694
64695
64696
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 64694

def preference_optimization_spec
  @preference_optimization_spec
end

#reinforcement_tuning_specGoogle::Apis::AiplatformV1beta1::GoogleCloudAiplatformV1beta1ReinforcementTuningSpec

Tuning spec for Reinforcement Tuning. Corresponds to the JSON property reinforcementTuningSpec



64699
64700
64701
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 64699

def reinforcement_tuning_spec
  @reinforcement_tuning_spec
end

#satisfies_pziBoolean Also known as: satisfies_pzi?

Output only. Reserved for future use. Corresponds to the JSON property satisfiesPzi

Returns:

  • (Boolean)


64704
64705
64706
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 64704

def satisfies_pzi
  @satisfies_pzi
end

#satisfies_pzsBoolean Also known as: satisfies_pzs?

Output only. Reserved for future use. Corresponds to the JSON property satisfiesPzs

Returns:

  • (Boolean)


64710
64711
64712
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 64710

def satisfies_pzs
  @satisfies_pzs
end

#service_accountString

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. Corresponds to the JSON property serviceAccount

Returns:

  • (String)


64720
64721
64722
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 64720

def 
  @service_account
end

#start_timeString

Output only. Time when the TuningJob for the first time entered the JOB_STATE_RUNNING state. Corresponds to the JSON property startTime

Returns:

  • (String)


64726
64727
64728
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 64726

def start_time
  @start_time
end

#stateString

Output only. The detailed state of the job. Corresponds to the JSON property state

Returns:

  • (String)


64731
64732
64733
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 64731

def state
  @state
end

#supervised_tuning_specGoogle::Apis::AiplatformV1beta1::GoogleCloudAiplatformV1beta1SupervisedTuningSpec

Tuning Spec for Supervised Tuning for first party models. Corresponds to the JSON property supervisedTuningSpec



64736
64737
64738
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 64736

def supervised_tuning_spec
  @supervised_tuning_spec
end

#tuned_modelGoogle::Apis::AiplatformV1beta1::GoogleCloudAiplatformV1beta1TunedModel

The Model Registry Model and Online Prediction Endpoint associated with this TuningJob. Corresponds to the JSON property tunedModel



64742
64743
64744
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 64742

def tuned_model
  @tuned_model
end

#tuned_model_display_nameString

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. Corresponds to the JSON property tunedModelDisplayName

Returns:

  • (String)


64751
64752
64753
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 64751

def tuned_model_display_name
  @tuned_model_display_name
end

#tuning_data_statsGoogle::Apis::AiplatformV1beta1::GoogleCloudAiplatformV1beta1TuningDataStats

The tuning data statistic values for TuningJob. Corresponds to the JSON property tuningDataStats



64756
64757
64758
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 64756

def tuning_data_stats
  @tuning_data_stats
end

#tuning_job_metadataGoogle::Apis::AiplatformV1beta1::GoogleCloudAiplatformV1beta1TuningJobMetadata

Tuning job metadata. Corresponds to the JSON property tuningJobMetadata



64761
64762
64763
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 64761

def 
  @tuning_job_metadata
end

#tuning_job_stateString

Output only. The detail state of the tuning job (while the overall JobState is running). Corresponds to the JSON property tuningJobState

Returns:

  • (String)


64767
64768
64769
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 64767

def tuning_job_state
  @tuning_job_state
end

#update_timeString

Output only. Time when the TuningJob was most recently updated. Corresponds to the JSON property updateTime

Returns:

  • (String)


64772
64773
64774
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 64772

def update_time
  @update_time
end

#veo_lora_tuning_specGoogle::Apis::AiplatformV1beta1::GoogleCloudAiplatformV1beta1VeoLoraTuningSpec

Tuning Spec for Veo LoRA Model Tuning. Corresponds to the JSON property veoLoraTuningSpec



64777
64778
64779
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 64777

def veo_lora_tuning_spec
  @veo_lora_tuning_spec
end

#veo_tuning_specGoogle::Apis::AiplatformV1beta1::GoogleCloudAiplatformV1beta1VeoTuningSpec

Tuning Spec for Veo Model Tuning. Corresponds to the JSON property veoTuningSpec



64782
64783
64784
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 64782

def veo_tuning_spec
  @veo_tuning_spec
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



64789
64790
64791
64792
64793
64794
64795
64796
64797
64798
64799
64800
64801
64802
64803
64804
64805
64806
64807
64808
64809
64810
64811
64812
64813
64814
64815
64816
64817
64818
64819
64820
64821
64822
64823
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 64789

def update!(**args)
  @base_model = args[:base_model] if args.key?(:base_model)
  @create_time = args[:create_time] if args.key?(:create_time)
  @custom_base_model = args[:custom_base_model] if args.key?(:custom_base_model)
  @description = args[:description] if args.key?(:description)
  @distillation_spec = args[:distillation_spec] if args.key?(:distillation_spec)
  @encryption_spec = args[:encryption_spec] if args.key?(:encryption_spec)
  @end_time = args[:end_time] if args.key?(:end_time)
  @error = args[:error] if args.key?(:error)
  @evaluate_dataset_runs = args[:evaluate_dataset_runs] if args.key?(:evaluate_dataset_runs)
  @experiment = args[:experiment] if args.key?(:experiment)
  @full_fine_tuning_spec = args[:full_fine_tuning_spec] if args.key?(:full_fine_tuning_spec)
  @labels = args[:labels] if args.key?(:labels)
  @name = args[:name] if args.key?(:name)
  @output_uri = args[:output_uri] if args.key?(:output_uri)
  @partner_model_tuning_spec = args[:partner_model_tuning_spec] if args.key?(:partner_model_tuning_spec)
  @pipeline_job = args[:pipeline_job] if args.key?(:pipeline_job)
  @pre_tuned_model = args[:pre_tuned_model] if args.key?(:pre_tuned_model)
  @preference_optimization_spec = args[:preference_optimization_spec] if args.key?(:preference_optimization_spec)
  @reinforcement_tuning_spec = args[:reinforcement_tuning_spec] if args.key?(:reinforcement_tuning_spec)
  @satisfies_pzi = args[:satisfies_pzi] if args.key?(:satisfies_pzi)
  @satisfies_pzs = args[:satisfies_pzs] if args.key?(:satisfies_pzs)
  @service_account = args[:service_account] if args.key?(:service_account)
  @start_time = args[:start_time] if args.key?(:start_time)
  @state = args[:state] if args.key?(:state)
  @supervised_tuning_spec = args[:supervised_tuning_spec] if args.key?(:supervised_tuning_spec)
  @tuned_model = args[:tuned_model] if args.key?(:tuned_model)
  @tuned_model_display_name = args[:tuned_model_display_name] if args.key?(:tuned_model_display_name)
  @tuning_data_stats = args[:tuning_data_stats] if args.key?(:tuning_data_stats)
  @tuning_job_metadata = args[:tuning_job_metadata] if args.key?(:tuning_job_metadata)
  @tuning_job_state = args[:tuning_job_state] if args.key?(:tuning_job_state)
  @update_time = args[:update_time] if args.key?(:update_time)
  @veo_lora_tuning_spec = args[:veo_lora_tuning_spec] if args.key?(:veo_lora_tuning_spec)
  @veo_tuning_spec = args[:veo_tuning_spec] if args.key?(:veo_tuning_spec)
end