Class: Google::Apis::AiplatformV1::GoogleCloudAiplatformV1Model

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

Overview

A trained machine learning Model.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudAiplatformV1Model

Returns a new instance of GoogleCloudAiplatformV1Model.



14118
14119
14120
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 14118

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

Instance Attribute Details

#artifact_uriString

Immutable. The path to the directory containing the Model artifact and any of its supporting files. Not required for AutoML Models. Corresponds to the JSON property artifactUri

Returns:

  • (String)


13883
13884
13885
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 13883

def artifact_uri
  @artifact_uri
end

#base_model_sourceGoogle::Apis::AiplatformV1::GoogleCloudAiplatformV1ModelBaseModelSource

User input field to specify the base model source. Currently it only supports specifing the Model Garden models and Genie models. Corresponds to the JSON property baseModelSource



13889
13890
13891
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 13889

def base_model_source
  @base_model_source
end

#container_specGoogle::Apis::AiplatformV1::GoogleCloudAiplatformV1ModelContainerSpec

Specification of a container for serving predictions. Some fields in this message correspond to fields in the Kubernetes Container v1 core specification. Corresponds to the JSON property containerSpec



13897
13898
13899
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 13897

def container_spec
  @container_spec
end

#create_timeString

Output only. Timestamp when this Model was uploaded into Vertex AI. Corresponds to the JSON property createTime

Returns:

  • (String)


13902
13903
13904
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 13902

def create_time
  @create_time
end

#data_statsGoogle::Apis::AiplatformV1::GoogleCloudAiplatformV1ModelDataStats

Stats of data used for train or evaluate the Model. Corresponds to the JSON property dataStats



13907
13908
13909
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 13907

def data_stats
  @data_stats
end

#deployed_modelsArray<Google::Apis::AiplatformV1::GoogleCloudAiplatformV1DeployedModelRef>

Output only. The pointers to DeployedModels created from this Model. Note that Model could have been deployed to Endpoints in different Locations. Corresponds to the JSON property deployedModels



13913
13914
13915
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 13913

def deployed_models
  @deployed_models
end

#descriptionString

The description of the Model. Corresponds to the JSON property description

Returns:

  • (String)


13918
13919
13920
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 13918

def description
  @description
end

#display_nameString

Required. The display name of the Model. The name can be up to 128 characters long and can consist of any UTF-8 characters. Corresponds to the JSON property displayName

Returns:

  • (String)


13924
13925
13926
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 13924

def display_name
  @display_name
end

#encryption_specGoogle::Apis::AiplatformV1::GoogleCloudAiplatformV1EncryptionSpec

Represents a customer-managed encryption key spec that can be applied to a top- level resource. Corresponds to the JSON property encryptionSpec



13930
13931
13932
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 13930

def encryption_spec
  @encryption_spec
end

#etagString

Used to perform consistent read-modify-write updates. If not set, a blind " overwrite" update happens. Corresponds to the JSON property etag

Returns:

  • (String)


13936
13937
13938
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 13936

def etag
  @etag
end

#explanation_specGoogle::Apis::AiplatformV1::GoogleCloudAiplatformV1ExplanationSpec

Specification of Model explanation. Corresponds to the JSON property explanationSpec



13941
13942
13943
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 13941

def explanation_spec
  @explanation_spec
end

#labelsHash<String,String>

The labels with user-defined metadata to organize your Models. 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>)


13950
13951
13952
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 13950

def labels
  @labels
end

#metadataObject

Immutable. An additional information about the Model; the schema of the metadata can be found in metadata_schema. Unset if the Model does not have any additional information. Corresponds to the JSON property metadata

Returns:

  • (Object)


13957
13958
13959
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 13957

def 
  @metadata
end

#metadata_artifactString

Output only. The resource name of the Artifact that was created in MetadataStore when creating the Model. The Artifact resource name pattern is projects/project/locations/location/metadataStores/metadata_store/ artifacts/artifact`. Corresponds to the JSON propertymetadataArtifact`

Returns:

  • (String)


13965
13966
13967
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 13965

def 
  @metadata_artifact
end

#metadata_schema_uriString

Immutable. Points to a YAML file stored on Google Cloud Storage describing additional information about the Model, that is specific to it. Unset if the Model does not have any additional information. The schema is defined as an OpenAPI 3.0.2 Schema Object. AutoML Models always have this field populated by Vertex AI, if no additional metadata is needed, this field is set to an empty string. Note: The URI given on output will be immutable and probably different, including the URI scheme, than the one given on input. The output URI will point to a location where the user only has a read access. Corresponds to the JSON property metadataSchemaUri

Returns:

  • (String)


13978
13979
13980
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 13978

def 
  @metadata_schema_uri
end

#model_source_infoGoogle::Apis::AiplatformV1::GoogleCloudAiplatformV1ModelSourceInfo

Detail description of the source information of the model. Corresponds to the JSON property modelSourceInfo



13983
13984
13985
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 13983

def model_source_info
  @model_source_info
end

#nameString

The resource name of the Model. Corresponds to the JSON property name

Returns:

  • (String)


13988
13989
13990
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 13988

def name
  @name
end

#original_model_infoGoogle::Apis::AiplatformV1::GoogleCloudAiplatformV1ModelOriginalModelInfo

Contains information about the original Model if this Model is a copy. Corresponds to the JSON property originalModelInfo



13993
13994
13995
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 13993

def original_model_info
  @original_model_info
end

#pipeline_jobString

Optional. This field is populated if the model is produced by a pipeline job. Corresponds to the JSON property pipelineJob

Returns:

  • (String)


13998
13999
14000
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 13998

def pipeline_job
  @pipeline_job
end

#predict_schemataGoogle::Apis::AiplatformV1::GoogleCloudAiplatformV1PredictSchemata

Contains the schemata used in Model's predictions and explanations via PredictionService.Predict, PredictionService.Explain and BatchPredictionJob. Corresponds to the JSON property predictSchemata



14004
14005
14006
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 14004

def predict_schemata
  @predict_schemata
end

#satisfies_pziBoolean Also known as: satisfies_pzi?

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

Returns:

  • (Boolean)


14009
14010
14011
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 14009

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)


14015
14016
14017
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 14015

def satisfies_pzs
  @satisfies_pzs
end

#supported_deployment_resources_typesArray<String>

Output only. When this Model is deployed, its prediction resources are described by the prediction_resources field of the Endpoint.deployed_models object. Because not all Models support all resource configuration types, the configuration types this Model supports are listed here. If no configuration types are listed, the Model cannot be deployed to an Endpoint and does not support online predictions (PredictionService.Predict or PredictionService. Explain). Such a Model can serve predictions by using a BatchPredictionJob, if it has at least one entry each in supported_input_storage_formats and supported_output_storage_formats. Corresponds to the JSON property supportedDeploymentResourcesTypes

Returns:

  • (Array<String>)


14029
14030
14031
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 14029

def supported_deployment_resources_types
  @supported_deployment_resources_types
end

#supported_export_formatsArray<Google::Apis::AiplatformV1::GoogleCloudAiplatformV1ModelExportFormat>

Output only. The formats in which this Model may be exported. If empty, this Model is not available for export. Corresponds to the JSON property supportedExportFormats



14035
14036
14037
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 14035

def supported_export_formats
  @supported_export_formats
end

#supported_input_storage_formatsArray<String>

Output only. The formats this Model supports in BatchPredictionJob. input_config. If PredictSchemata.instance_schema_uri exists, the instances should be given as per that schema. The possible formats are: * jsonl The JSON Lines format, where each instance is a single line. Uses GcsSource. * csv The CSV format, where each instance is a single comma-separated line. The first line in the file is the header, containing comma-separated field names. Uses GcsSource. * tf-record The TFRecord format, where each instance is a single record in tfrecord syntax. Uses GcsSource. * tf-record-gzip Similar to tf-record, but the file is gzipped. Uses GcsSource. * bigquery Each instance is a single row in BigQuery. Uses BigQuerySource. * file-list Each line of the file is the location of an instance to process, uses gcs_source field of the InputConfig object. If this Model doesn't support any of these formats it means it cannot be used with a BatchPredictionJob. However, if it has supported_deployment_resources_types, it could serve online predictions by using PredictionService.Predict or PredictionService.Explain. Corresponds to the JSON property supportedInputStorageFormats

Returns:

  • (Array<String>)


14054
14055
14056
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 14054

def supported_input_storage_formats
  @supported_input_storage_formats
end

#supported_output_storage_formatsArray<String>

Output only. The formats this Model supports in BatchPredictionJob. output_config. If both PredictSchemata.instance_schema_uri and PredictSchemata. prediction_schema_uri exist, the predictions are returned together with their instances. In other words, the prediction has the original instance data first, followed by the actual prediction content (as per the schema). The possible formats are: * jsonl The JSON Lines format, where each prediction is a single line. Uses GcsDestination. * csv The CSV format, where each prediction is a single comma-separated line. The first line in the file is the header, containing comma-separated field names. Uses GcsDestination. * bigquery Each prediction is a single row in a BigQuery table, uses BigQueryDestination . If this Model doesn't support any of these formats it means it cannot be used with a BatchPredictionJob. However, if it has supported_deployment_resources_types, it could serve online predictions by using PredictionService.Predict or PredictionService.Explain. Corresponds to the JSON property supportedOutputStorageFormats

Returns:

  • (Array<String>)


14072
14073
14074
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 14072

def supported_output_storage_formats
  @supported_output_storage_formats
end

#training_pipelineString

Output only. The resource name of the TrainingPipeline that uploaded this Model, if any. Corresponds to the JSON property trainingPipeline

Returns:

  • (String)


14078
14079
14080
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 14078

def training_pipeline
  @training_pipeline
end

#update_timeString

Output only. Timestamp when this Model was most recently updated. Corresponds to the JSON property updateTime

Returns:

  • (String)


14083
14084
14085
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 14083

def update_time
  @update_time
end

#version_aliasesArray<String>

User provided version aliases so that a model version can be referenced via alias (i.e. projects/project/locations/location/models/model_id@ version_alias`instead of auto-generated version id (i.e.projects/project/ locations/location/models/model_id@version_id). The format is a-z0,126 [a-z0-9] to distinguish from version_id. A default version alias will be created for the first version of the model, and there must be exactly one default version alias for a model. Corresponds to the JSON propertyversionAliases`

Returns:

  • (Array<String>)


14094
14095
14096
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 14094

def version_aliases
  @version_aliases
end

#version_create_timeString

Output only. Timestamp when this version was created. Corresponds to the JSON property versionCreateTime

Returns:

  • (String)


14099
14100
14101
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 14099

def version_create_time
  @version_create_time
end

#version_descriptionString

The description of this version. Corresponds to the JSON property versionDescription

Returns:

  • (String)


14104
14105
14106
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 14104

def version_description
  @version_description
end

#version_idString

Output only. Immutable. The version ID of the model. A new version is committed when a new model version is uploaded or trained under an existing model id. It is an auto-incrementing decimal number in string representation. Corresponds to the JSON property versionId

Returns:

  • (String)


14111
14112
14113
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 14111

def version_id
  @version_id
end

#version_update_timeString

Output only. Timestamp when this version was most recently updated. Corresponds to the JSON property versionUpdateTime

Returns:

  • (String)


14116
14117
14118
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 14116

def version_update_time
  @version_update_time
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



14123
14124
14125
14126
14127
14128
14129
14130
14131
14132
14133
14134
14135
14136
14137
14138
14139
14140
14141
14142
14143
14144
14145
14146
14147
14148
14149
14150
14151
14152
14153
14154
14155
14156
14157
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 14123

def update!(**args)
  @artifact_uri = args[:artifact_uri] if args.key?(:artifact_uri)
  @base_model_source = args[:base_model_source] if args.key?(:base_model_source)
  @container_spec = args[:container_spec] if args.key?(:container_spec)
  @create_time = args[:create_time] if args.key?(:create_time)
  @data_stats = args[:data_stats] if args.key?(:data_stats)
  @deployed_models = args[:deployed_models] if args.key?(:deployed_models)
  @description = args[:description] if args.key?(:description)
  @display_name = args[:display_name] if args.key?(:display_name)
  @encryption_spec = args[:encryption_spec] if args.key?(:encryption_spec)
  @etag = args[:etag] if args.key?(:etag)
  @explanation_spec = args[:explanation_spec] if args.key?(:explanation_spec)
  @labels = args[:labels] if args.key?(:labels)
  @metadata = args[:metadata] if args.key?(:metadata)
  @metadata_artifact = args[:metadata_artifact] if args.key?(:metadata_artifact)
  @metadata_schema_uri = args[:metadata_schema_uri] if args.key?(:metadata_schema_uri)
  @model_source_info = args[:model_source_info] if args.key?(:model_source_info)
  @name = args[:name] if args.key?(:name)
  @original_model_info = args[:original_model_info] if args.key?(:original_model_info)
  @pipeline_job = args[:pipeline_job] if args.key?(:pipeline_job)
  @predict_schemata = args[:predict_schemata] if args.key?(:predict_schemata)
  @satisfies_pzi = args[:satisfies_pzi] if args.key?(:satisfies_pzi)
  @satisfies_pzs = args[:satisfies_pzs] if args.key?(:satisfies_pzs)
  @supported_deployment_resources_types = args[:supported_deployment_resources_types] if args.key?(:supported_deployment_resources_types)
  @supported_export_formats = args[:supported_export_formats] if args.key?(:supported_export_formats)
  @supported_input_storage_formats = args[:supported_input_storage_formats] if args.key?(:supported_input_storage_formats)
  @supported_output_storage_formats = args[:supported_output_storage_formats] if args.key?(:supported_output_storage_formats)
  @training_pipeline = args[:training_pipeline] if args.key?(:training_pipeline)
  @update_time = args[:update_time] if args.key?(:update_time)
  @version_aliases = args[:version_aliases] if args.key?(:version_aliases)
  @version_create_time = args[:version_create_time] if args.key?(:version_create_time)
  @version_description = args[:version_description] if args.key?(:version_description)
  @version_id = args[:version_id] if args.key?(:version_id)
  @version_update_time = args[:version_update_time] if args.key?(:version_update_time)
end