- 0.55.0 (latest)
- 0.54.0
- 0.53.0
- 0.52.0
- 0.51.0
- 0.50.0
- 0.49.0
- 0.48.0
- 0.47.0
- 0.46.0
- 0.45.0
- 0.44.0
- 0.43.0
- 0.42.0
- 0.41.0
- 0.40.0
- 0.39.0
- 0.38.0
- 0.37.0
- 0.36.0
- 0.35.0
- 0.34.0
- 0.33.0
- 0.32.0
- 0.31.0
- 0.30.0
- 0.29.0
- 0.28.0
- 0.27.0
- 0.26.0
- 0.25.0
- 0.24.0
- 0.23.0
- 0.22.0
- 0.21.0
- 0.20.0
- 0.19.0
- 0.18.0
- 0.17.0
- 0.16.0
- 0.15.0
- 0.14.0
- 0.13.0
- 0.12.0
- 0.11.0
- 0.10.0
- 0.9.1
- 0.8.0
- 0.7.0
- 0.6.0
- 0.5.0
- 0.4.0
- 0.3.0
- 0.2.0
- 0.1.0
Reference documentation and code samples for the Vertex AI V1 API class Google::Cloud::AIPlatform::V1::ModelService::Client.
Client for the ModelService service.
A service for managing Vertex AI's machine learning Models.
Inherits
- Object
Methods
.configure
def self.configure() { |config| ... } -> Client::Configuration
Configure the ModelService Client class.
See Configuration for a description of the configuration fields.
- (config) — Configure the Client client.
- config (Client::Configuration)
# Modify the configuration for all ModelService clients ::Google::Cloud::AIPlatform::V1::ModelService::Client.configure do |config| config.timeout = 10.0 end
#batch_import_evaluated_annotations
def batch_import_evaluated_annotations(request, options = nil) -> ::Google::Cloud::AIPlatform::V1::BatchImportEvaluatedAnnotationsResponse
def batch_import_evaluated_annotations(parent: nil, evaluated_annotations: nil) -> ::Google::Cloud::AIPlatform::V1::BatchImportEvaluatedAnnotationsResponse
Imports a list of externally generated EvaluatedAnnotations.
def batch_import_evaluated_annotations(request, options = nil) -> ::Google::Cloud::AIPlatform::V1::BatchImportEvaluatedAnnotationsResponse
batch_import_evaluated_annotations
via a request object, either of type
BatchImportEvaluatedAnnotationsRequest or an equivalent Hash.
- request (::Google::Cloud::AIPlatform::V1::BatchImportEvaluatedAnnotationsRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def batch_import_evaluated_annotations(parent: nil, evaluated_annotations: nil) -> ::Google::Cloud::AIPlatform::V1::BatchImportEvaluatedAnnotationsResponse
batch_import_evaluated_annotations
via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
-
parent (::String) — Required. The name of the parent ModelEvaluationSlice resource.
Format:
projects/{project}/locations/{location}/models/{model}/evaluations/{evaluation}/slices/{slice}
- evaluated_annotations (::Array<::Google::Cloud::AIPlatform::V1::EvaluatedAnnotation, ::Hash>) — Required. Evaluated annotations resource to be imported.
- (response, operation) — Access the result along with the RPC operation
- response (::Google::Cloud::AIPlatform::V1::BatchImportEvaluatedAnnotationsResponse)
- operation (::GRPC::ActiveCall::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/ai_platform/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::AIPlatform::V1::ModelService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::AIPlatform::V1::BatchImportEvaluatedAnnotationsRequest.new # Call the batch_import_evaluated_annotations method. result = client.batch_import_evaluated_annotations request # The returned object is of type Google::Cloud::AIPlatform::V1::BatchImportEvaluatedAnnotationsResponse. p result
#batch_import_model_evaluation_slices
def batch_import_model_evaluation_slices(request, options = nil) -> ::Google::Cloud::AIPlatform::V1::BatchImportModelEvaluationSlicesResponse
def batch_import_model_evaluation_slices(parent: nil, model_evaluation_slices: nil) -> ::Google::Cloud::AIPlatform::V1::BatchImportModelEvaluationSlicesResponse
Imports a list of externally generated ModelEvaluationSlice.
def batch_import_model_evaluation_slices(request, options = nil) -> ::Google::Cloud::AIPlatform::V1::BatchImportModelEvaluationSlicesResponse
batch_import_model_evaluation_slices
via a request object, either of type
BatchImportModelEvaluationSlicesRequest or an equivalent Hash.
- request (::Google::Cloud::AIPlatform::V1::BatchImportModelEvaluationSlicesRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def batch_import_model_evaluation_slices(parent: nil, model_evaluation_slices: nil) -> ::Google::Cloud::AIPlatform::V1::BatchImportModelEvaluationSlicesResponse
batch_import_model_evaluation_slices
via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
-
parent (::String) — Required. The name of the parent ModelEvaluation resource.
Format:
projects/{project}/locations/{location}/models/{model}/evaluations/{evaluation}
- model_evaluation_slices (::Array<::Google::Cloud::AIPlatform::V1::ModelEvaluationSlice, ::Hash>) — Required. Model evaluation slice resource to be imported.
- (response, operation) — Access the result along with the RPC operation
- response (::Google::Cloud::AIPlatform::V1::BatchImportModelEvaluationSlicesResponse)
- operation (::GRPC::ActiveCall::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/ai_platform/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::AIPlatform::V1::ModelService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::AIPlatform::V1::BatchImportModelEvaluationSlicesRequest.new # Call the batch_import_model_evaluation_slices method. result = client.batch_import_model_evaluation_slices request # The returned object is of type Google::Cloud::AIPlatform::V1::BatchImportModelEvaluationSlicesResponse. p result
#configure
def configure() { |config| ... } -> Client::Configuration
Configure the ModelService Client instance.
The configuration is set to the derived mode, meaning that values can be changed, but structural changes (adding new fields, etc.) are not allowed. Structural changes should be made on Client.configure.
See Configuration for a description of the configuration fields.
- (config) — Configure the Client client.
- config (Client::Configuration)
#copy_model
def copy_model(request, options = nil) -> ::Gapic::Operation
def copy_model(model_id: nil, parent_model: nil, parent: nil, source_model: nil, encryption_spec: nil) -> ::Gapic::Operation
Copies an already existing Vertex AI Model into the specified Location. The source Model must exist in the same Project. When copying custom Models, the users themselves are responsible for Model.metadata content to be region-agnostic, as well as making sure that any resources (e.g. files) it depends on remain accessible.
def copy_model(request, options = nil) -> ::Gapic::Operation
copy_model
via a request object, either of type
CopyModelRequest or an equivalent Hash.
- request (::Google::Cloud::AIPlatform::V1::CopyModelRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def copy_model(model_id: nil, parent_model: nil, parent: nil, source_model: nil, encryption_spec: nil) -> ::Gapic::Operation
copy_model
via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
-
model_id (::String) — Optional. Copy source_model into a new Model with this ID. The ID will
become the final component of the model resource name.
This value may be up to 63 characters, and valid characters are
[a-z0-9_-]
. The first character cannot be a number or hyphen. -
parent_model (::String) — Optional. Specify this field to copy source_model into this existing
Model as a new version. Format:
projects/{project}/locations/{location}/models/{model}
-
parent (::String) — Required. The resource name of the Location into which to copy the Model.
Format:
projects/{project}/locations/{location}
-
source_model (::String) — Required. The resource name of the Model to copy. That Model must be in the
same Project. Format:
projects/{project}/locations/{location}/models/{model}
- encryption_spec (::Google::Cloud::AIPlatform::V1::EncryptionSpec, ::Hash) — Customer-managed encryption key options. If this is set, then the Model copy will be encrypted with the provided encryption key.
- (response, operation) — Access the result along with the RPC operation
- response (::Gapic::Operation)
- operation (::GRPC::ActiveCall::Operation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/ai_platform/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::AIPlatform::V1::ModelService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::AIPlatform::V1::CopyModelRequest.new # Call the copy_model method. result = client.copy_model request # The returned object is of type Gapic::Operation. You can use it to # check the status of an operation, cancel it, or wait for results. # Here is how to wait for a response. result.wait_until_done! timeout: 60 if result.response? p result.response else puts "No response received." end
#delete_model
def delete_model(request, options = nil) -> ::Gapic::Operation
def delete_model(name: nil) -> ::Gapic::Operation
Deletes a Model.
A model cannot be deleted if any Endpoint resource has a DeployedModel based on the model in its deployed_models field.
def delete_model(request, options = nil) -> ::Gapic::Operation
delete_model
via a request object, either of type
DeleteModelRequest or an equivalent Hash.
- request (::Google::Cloud::AIPlatform::V1::DeleteModelRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def delete_model(name: nil) -> ::Gapic::Operation
delete_model
via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
-
name (::String) — Required. The name of the Model resource to be deleted.
Format:
projects/{project}/locations/{location}/models/{model}
- (response, operation) — Access the result along with the RPC operation
- response (::Gapic::Operation)
- operation (::GRPC::ActiveCall::Operation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/ai_platform/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::AIPlatform::V1::ModelService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::AIPlatform::V1::DeleteModelRequest.new # Call the delete_model method. result = client.delete_model request # The returned object is of type Gapic::Operation. You can use it to # check the status of an operation, cancel it, or wait for results. # Here is how to wait for a response. result.wait_until_done! timeout: 60 if result.response? p result.response else puts "No response received." end
#delete_model_version
def delete_model_version(request, options = nil) -> ::Gapic::Operation
def delete_model_version(name: nil) -> ::Gapic::Operation
Deletes a Model version.
Model version can only be deleted if there are no DeployedModels created from it. Deleting the only version in the Model is not allowed. Use DeleteModel for deleting the Model instead.
def delete_model_version(request, options = nil) -> ::Gapic::Operation
delete_model_version
via a request object, either of type
DeleteModelVersionRequest or an equivalent Hash.
- request (::Google::Cloud::AIPlatform::V1::DeleteModelVersionRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def delete_model_version(name: nil) -> ::Gapic::Operation
delete_model_version
via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
-
name (::String) — Required. The name of the model version to be deleted, with a version ID
explicitly included.
Example:
projects/{project}/locations/{location}/models/{model}@1234
- (response, operation) — Access the result along with the RPC operation
- response (::Gapic::Operation)
- operation (::GRPC::ActiveCall::Operation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/ai_platform/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::AIPlatform::V1::ModelService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::AIPlatform::V1::DeleteModelVersionRequest.new # Call the delete_model_version method. result = client.delete_model_version request # The returned object is of type Gapic::Operation. You can use it to # check the status of an operation, cancel it, or wait for results. # Here is how to wait for a response. result.wait_until_done! timeout: 60 if result.response? p result.response else puts "No response received." end
#export_model
def export_model(request, options = nil) -> ::Gapic::Operation
def export_model(name: nil, output_config: nil) -> ::Gapic::Operation
Exports a trained, exportable Model to a location specified by the user. A Model is considered to be exportable if it has at least one [supported export format][google.cloud.aiplatform.v1.Model.supported_export_formats].
def export_model(request, options = nil) -> ::Gapic::Operation
export_model
via a request object, either of type
ExportModelRequest or an equivalent Hash.
- request (::Google::Cloud::AIPlatform::V1::ExportModelRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def export_model(name: nil, output_config: nil) -> ::Gapic::Operation
export_model
via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
- name (::String) — Required. The resource name of the Model to export. The resource name may contain version id or version alias to specify the version, if no version is specified, the default version will be exported.
- output_config (::Google::Cloud::AIPlatform::V1::ExportModelRequest::OutputConfig, ::Hash) — Required. The desired output location and configuration.
- (response, operation) — Access the result along with the RPC operation
- response (::Gapic::Operation)
- operation (::GRPC::ActiveCall::Operation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/ai_platform/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::AIPlatform::V1::ModelService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::AIPlatform::V1::ExportModelRequest.new # Call the export_model method. result = client.export_model request # The returned object is of type Gapic::Operation. You can use it to # check the status of an operation, cancel it, or wait for results. # Here is how to wait for a response. result.wait_until_done! timeout: 60 if result.response? p result.response else puts "No response received." end
#get_model
def get_model(request, options = nil) -> ::Google::Cloud::AIPlatform::V1::Model
def get_model(name: nil) -> ::Google::Cloud::AIPlatform::V1::Model
Gets a Model.
def get_model(request, options = nil) -> ::Google::Cloud::AIPlatform::V1::Model
get_model
via a request object, either of type
GetModelRequest or an equivalent Hash.
- request (::Google::Cloud::AIPlatform::V1::GetModelRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def get_model(name: nil) -> ::Google::Cloud::AIPlatform::V1::Model
get_model
via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
-
name (::String) — Required. The name of the Model resource.
Format:
projects/{project}/locations/{location}/models/{model}
In order to retrieve a specific version of the model, also provide the version ID or version alias. Example:
projects/{project}/locations/{location}/models/{model}@2
orprojects/{project}/locations/{location}/models/{model}@golden
If no version ID or alias is specified, the "default" version will be returned. The "default" version alias is created for the first version of the model, and can be moved to other versions later on. There will be exactly one default version.
- (response, operation) — Access the result along with the RPC operation
- response (::Google::Cloud::AIPlatform::V1::Model)
- operation (::GRPC::ActiveCall::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/ai_platform/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::AIPlatform::V1::ModelService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::AIPlatform::V1::GetModelRequest.new # Call the get_model method. result = client.get_model request # The returned object is of type Google::Cloud::AIPlatform::V1::Model. p result
#get_model_evaluation
def get_model_evaluation(request, options = nil) -> ::Google::Cloud::AIPlatform::V1::ModelEvaluation
def get_model_evaluation(name: nil) -> ::Google::Cloud::AIPlatform::V1::ModelEvaluation
Gets a ModelEvaluation.
def get_model_evaluation(request, options = nil) -> ::Google::Cloud::AIPlatform::V1::ModelEvaluation
get_model_evaluation
via a request object, either of type
GetModelEvaluationRequest or an equivalent Hash.
- request (::Google::Cloud::AIPlatform::V1::GetModelEvaluationRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def get_model_evaluation(name: nil) -> ::Google::Cloud::AIPlatform::V1::ModelEvaluation
get_model_evaluation
via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
-
name (::String) — Required. The name of the ModelEvaluation resource.
Format:
projects/{project}/locations/{location}/models/{model}/evaluations/{evaluation}
- (response, operation) — Access the result along with the RPC operation
- response (::Google::Cloud::AIPlatform::V1::ModelEvaluation)
- operation (::GRPC::ActiveCall::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/ai_platform/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::AIPlatform::V1::ModelService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::AIPlatform::V1::GetModelEvaluationRequest.new # Call the get_model_evaluation method. result = client.get_model_evaluation request # The returned object is of type Google::Cloud::AIPlatform::V1::ModelEvaluation. p result
#get_model_evaluation_slice
def get_model_evaluation_slice(request, options = nil) -> ::Google::Cloud::AIPlatform::V1::ModelEvaluationSlice
def get_model_evaluation_slice(name: nil) -> ::Google::Cloud::AIPlatform::V1::ModelEvaluationSlice
Gets a ModelEvaluationSlice.
def get_model_evaluation_slice(request, options = nil) -> ::Google::Cloud::AIPlatform::V1::ModelEvaluationSlice
get_model_evaluation_slice
via a request object, either of type
GetModelEvaluationSliceRequest or an equivalent Hash.
- request (::Google::Cloud::AIPlatform::V1::GetModelEvaluationSliceRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def get_model_evaluation_slice(name: nil) -> ::Google::Cloud::AIPlatform::V1::ModelEvaluationSlice
get_model_evaluation_slice
via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
-
name (::String) — Required. The name of the ModelEvaluationSlice resource.
Format:
projects/{project}/locations/{location}/models/{model}/evaluations/{evaluation}/slices/{slice}
- (response, operation) — Access the result along with the RPC operation
- response (::Google::Cloud::AIPlatform::V1::ModelEvaluationSlice)
- operation (::GRPC::ActiveCall::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/ai_platform/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::AIPlatform::V1::ModelService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::AIPlatform::V1::GetModelEvaluationSliceRequest.new # Call the get_model_evaluation_slice method. result = client.get_model_evaluation_slice request # The returned object is of type Google::Cloud::AIPlatform::V1::ModelEvaluationSlice. p result
#iam_policy_client
def iam_policy_client() -> Google::Iam::V1::IAMPolicy::Client
Get the associated client for mix-in of the IAMPolicy.
- (Google::Iam::V1::IAMPolicy::Client)
#import_model_evaluation
def import_model_evaluation(request, options = nil) -> ::Google::Cloud::AIPlatform::V1::ModelEvaluation
def import_model_evaluation(parent: nil, model_evaluation: nil) -> ::Google::Cloud::AIPlatform::V1::ModelEvaluation
Imports an externally generated ModelEvaluation.
def import_model_evaluation(request, options = nil) -> ::Google::Cloud::AIPlatform::V1::ModelEvaluation
import_model_evaluation
via a request object, either of type
ImportModelEvaluationRequest or an equivalent Hash.
- request (::Google::Cloud::AIPlatform::V1::ImportModelEvaluationRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def import_model_evaluation(parent: nil, model_evaluation: nil) -> ::Google::Cloud::AIPlatform::V1::ModelEvaluation
import_model_evaluation
via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
-
parent (::String) — Required. The name of the parent model resource.
Format:
projects/{project}/locations/{location}/models/{model}
- model_evaluation (::Google::Cloud::AIPlatform::V1::ModelEvaluation, ::Hash) — Required. Model evaluation resource to be imported.
- (response, operation) — Access the result along with the RPC operation
- response (::Google::Cloud::AIPlatform::V1::ModelEvaluation)
- operation (::GRPC::ActiveCall::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/ai_platform/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::AIPlatform::V1::ModelService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::AIPlatform::V1::ImportModelEvaluationRequest.new # Call the import_model_evaluation method. result = client.import_model_evaluation request # The returned object is of type Google::Cloud::AIPlatform::V1::ModelEvaluation. p result
#initialize
def initialize() { |config| ... } -> Client
Create a new ModelService client object.
- (config) — Configure the ModelService client.
- config (Client::Configuration)
- (Client) — a new instance of Client
# Create a client using the default configuration client = ::Google::Cloud::AIPlatform::V1::ModelService::Client.new # Create a client using a custom configuration client = ::Google::Cloud::AIPlatform::V1::ModelService::Client.new do |config| config.timeout = 10.0 end
#list_model_evaluation_slices
def list_model_evaluation_slices(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::AIPlatform::V1::ModelEvaluationSlice>
def list_model_evaluation_slices(parent: nil, filter: nil, page_size: nil, page_token: nil, read_mask: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::AIPlatform::V1::ModelEvaluationSlice>
Lists ModelEvaluationSlices in a ModelEvaluation.
def list_model_evaluation_slices(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::AIPlatform::V1::ModelEvaluationSlice>
list_model_evaluation_slices
via a request object, either of type
ListModelEvaluationSlicesRequest or an equivalent Hash.
- request (::Google::Cloud::AIPlatform::V1::ListModelEvaluationSlicesRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def list_model_evaluation_slices(parent: nil, filter: nil, page_size: nil, page_token: nil, read_mask: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::AIPlatform::V1::ModelEvaluationSlice>
list_model_evaluation_slices
via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
-
parent (::String) — Required. The resource name of the ModelEvaluation to list the
ModelEvaluationSlices from. Format:
projects/{project}/locations/{location}/models/{model}/evaluations/{evaluation}
-
filter (::String) —
The standard list filter.
slice.dimension
- for =.
- page_size (::Integer) — The standard list page size.
- page_token (::String) — The standard list page token. Typically obtained via ListModelEvaluationSlicesResponse.next_page_token of the previous ModelService.ListModelEvaluationSlices call.
- read_mask (::Google::Protobuf::FieldMask, ::Hash) — Mask specifying which fields to read.
- (response, operation) — Access the result along with the RPC operation
- response (::Gapic::PagedEnumerable<::Google::Cloud::AIPlatform::V1::ModelEvaluationSlice>)
- operation (::GRPC::ActiveCall::Operation)
- (::Gapic::PagedEnumerable<::Google::Cloud::AIPlatform::V1::ModelEvaluationSlice>)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/ai_platform/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::AIPlatform::V1::ModelService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::AIPlatform::V1::ListModelEvaluationSlicesRequest.new # Call the list_model_evaluation_slices method. result = client.list_model_evaluation_slices request # The returned object is of type Gapic::PagedEnumerable. You can iterate # over elements, and API calls will be issued to fetch pages as needed. result.each do |item| # Each element is of type ::Google::Cloud::AIPlatform::V1::ModelEvaluationSlice. p item end
#list_model_evaluations
def list_model_evaluations(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::AIPlatform::V1::ModelEvaluation>
def list_model_evaluations(parent: nil, filter: nil, page_size: nil, page_token: nil, read_mask: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::AIPlatform::V1::ModelEvaluation>
Lists ModelEvaluations in a Model.
def list_model_evaluations(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::AIPlatform::V1::ModelEvaluation>
list_model_evaluations
via a request object, either of type
ListModelEvaluationsRequest or an equivalent Hash.
- request (::Google::Cloud::AIPlatform::V1::ListModelEvaluationsRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def list_model_evaluations(parent: nil, filter: nil, page_size: nil, page_token: nil, read_mask: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::AIPlatform::V1::ModelEvaluation>
list_model_evaluations
via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
-
parent (::String) — Required. The resource name of the Model to list the ModelEvaluations from.
Format:
projects/{project}/locations/{location}/models/{model}
- filter (::String) — The standard list filter.
- page_size (::Integer) — The standard list page size.
- page_token (::String) — The standard list page token. Typically obtained via ListModelEvaluationsResponse.next_page_token of the previous ModelService.ListModelEvaluations call.
- read_mask (::Google::Protobuf::FieldMask, ::Hash) — Mask specifying which fields to read.
- (response, operation) — Access the result along with the RPC operation
- response (::Gapic::PagedEnumerable<::Google::Cloud::AIPlatform::V1::ModelEvaluation>)
- operation (::GRPC::ActiveCall::Operation)
- (::Gapic::PagedEnumerable<::Google::Cloud::AIPlatform::V1::ModelEvaluation>)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/ai_platform/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::AIPlatform::V1::ModelService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::AIPlatform::V1::ListModelEvaluationsRequest.new # Call the list_model_evaluations method. result = client.list_model_evaluations request # The returned object is of type Gapic::PagedEnumerable. You can iterate # over elements, and API calls will be issued to fetch pages as needed. result.each do |item| # Each element is of type ::Google::Cloud::AIPlatform::V1::ModelEvaluation. p item end
#list_model_versions
def list_model_versions(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::AIPlatform::V1::Model>
def list_model_versions(name: nil, page_size: nil, page_token: nil, filter: nil, read_mask: nil, order_by: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::AIPlatform::V1::Model>
Lists versions of the specified model.
def list_model_versions(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::AIPlatform::V1::Model>
list_model_versions
via a request object, either of type
ListModelVersionsRequest or an equivalent Hash.
- request (::Google::Cloud::AIPlatform::V1::ListModelVersionsRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def list_model_versions(name: nil, page_size: nil, page_token: nil, filter: nil, read_mask: nil, order_by: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::AIPlatform::V1::Model>
list_model_versions
via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
- name (::String) — Required. The name of the model to list versions for.
- page_size (::Integer) — The standard list page size.
- page_token (::String) — The standard list page token. Typically obtained via next_page_token of the previous ListModelVersions call.
-
filter (::String) —
An expression for filtering the results of the request. For field names both snake_case and camelCase are supported.
labels
supports general map functions that is:labels.key=value
- key:value equality- `labels.key:* or labels:key - key existence
- A key including a space must be quoted.
labels."a key"
.
Some examples:
labels.myKey="myValue"
- read_mask (::Google::Protobuf::FieldMask, ::Hash) — Mask specifying which fields to read.
-
order_by (::String) — A comma-separated list of fields to order by, sorted in ascending order.
Use "desc" after a field name for descending.
Supported fields:
create_time
update_time
Example:
update_time asc, create_time desc
.
- (response, operation) — Access the result along with the RPC operation
- response (::Gapic::PagedEnumerable<::Google::Cloud::AIPlatform::V1::Model>)
- operation (::GRPC::ActiveCall::Operation)
- (::Gapic::PagedEnumerable<::Google::Cloud::AIPlatform::V1::Model>)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/ai_platform/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::AIPlatform::V1::ModelService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::AIPlatform::V1::ListModelVersionsRequest.new # Call the list_model_versions method. result = client.list_model_versions request # The returned object is of type Gapic::PagedEnumerable. You can iterate # over elements, and API calls will be issued to fetch pages as needed. result.each do |item| # Each element is of type ::Google::Cloud::AIPlatform::V1::Model. p item end
#list_models
def list_models(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::AIPlatform::V1::Model>
def list_models(parent: nil, filter: nil, page_size: nil, page_token: nil, read_mask: nil, order_by: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::AIPlatform::V1::Model>
Lists Models in a Location.
def list_models(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::AIPlatform::V1::Model>
list_models
via a request object, either of type
ListModelsRequest or an equivalent Hash.
- request (::Google::Cloud::AIPlatform::V1::ListModelsRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def list_models(parent: nil, filter: nil, page_size: nil, page_token: nil, read_mask: nil, order_by: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::AIPlatform::V1::Model>
list_models
via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
-
parent (::String) — Required. The resource name of the Location to list the Models from.
Format:
projects/{project}/locations/{location}
-
filter (::String) —
An expression for filtering the results of the request. For field names both snake_case and camelCase are supported.
model
supports = and !=.model
represents the Model ID, i.e. the last segment of the Model's [resource name][google.cloud.aiplatform.v1.Model.name].display_name
supports = and !=labels
supports general map functions that is:labels.key=value
- key:value equality- `labels.key:* or labels:key - key existence
- A key including a space must be quoted.
labels."a key"
.
base_model_name
only supports =
Some examples:
model=1234
displayName="myDisplayName"
labels.myKey="myValue"
baseModelName="text-bison"
- page_size (::Integer) — The standard list page size.
- page_token (::String) — The standard list page token. Typically obtained via ListModelsResponse.next_page_token of the previous ModelService.ListModels call.
- read_mask (::Google::Protobuf::FieldMask, ::Hash) — Mask specifying which fields to read.
-
order_by (::String) — A comma-separated list of fields to order by, sorted in ascending order.
Use "desc" after a field name for descending.
Supported fields:
display_name
create_time
update_time
Example:
display_name, create_time desc
.
- (response, operation) — Access the result along with the RPC operation
- response (::Gapic::PagedEnumerable<::Google::Cloud::AIPlatform::V1::Model>)
- operation (::GRPC::ActiveCall::Operation)
- (::Gapic::PagedEnumerable<::Google::Cloud::AIPlatform::V1::Model>)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/ai_platform/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::AIPlatform::V1::ModelService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::AIPlatform::V1::ListModelsRequest.new # Call the list_models method. result = client.list_models request # The returned object is of type Gapic::PagedEnumerable. You can iterate # over elements, and API calls will be issued to fetch pages as needed. result.each do |item| # Each element is of type ::Google::Cloud::AIPlatform::V1::Model. p item end
#location_client
def location_client() -> Google::Cloud::Location::Locations::Client
Get the associated client for mix-in of the Locations.
- (Google::Cloud::Location::Locations::Client)
#merge_version_aliases
def merge_version_aliases(request, options = nil) -> ::Google::Cloud::AIPlatform::V1::Model
def merge_version_aliases(name: nil, version_aliases: nil) -> ::Google::Cloud::AIPlatform::V1::Model
Merges a set of aliases for a Model version.
def merge_version_aliases(request, options = nil) -> ::Google::Cloud::AIPlatform::V1::Model
merge_version_aliases
via a request object, either of type
Google::Cloud::AIPlatform::V1::MergeVersionAliasesRequest or an equivalent Hash.
- request (::Google::Cloud::AIPlatform::V1::MergeVersionAliasesRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def merge_version_aliases(name: nil, version_aliases: nil) -> ::Google::Cloud::AIPlatform::V1::Model
merge_version_aliases
via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
-
name (::String) — Required. The name of the model version to merge aliases, with a version ID
explicitly included.
Example:
projects/{project}/locations/{location}/models/{model}@1234
-
version_aliases (::Array<::String>) — Required. The set of version aliases to merge.
The alias should be at most 128 characters, and match
[a-z][a-zA-Z0-9-]{0,126}[a-z-0-9]
. Add the-
prefix to an alias means removing that alias from the version.-
is NOT counted in the 128 characters. Example:-golden
means removing thegolden
alias from the version.There is NO ordering in aliases, which means 1) The aliases returned from GetModel API might not have the exactly same order from this MergeVersionAliases API. 2) Adding and deleting the same alias in the request is not recommended, and the 2 operations will be cancelled out.
- (response, operation) — Access the result along with the RPC operation
- response (::Google::Cloud::AIPlatform::V1::Model)
- operation (::GRPC::ActiveCall::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/ai_platform/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::AIPlatform::V1::ModelService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::AIPlatform::V1::MergeVersionAliasesRequest.new # Call the merge_version_aliases method. result = client.merge_version_aliases request # The returned object is of type Google::Cloud::AIPlatform::V1::Model. p result
#operations_client
def operations_client() -> ::Google::Cloud::AIPlatform::V1::ModelService::Operations
Get the associated client for long-running operations.
#universe_domain
def universe_domain() -> String
The effective universe domain
- (String)
#update_explanation_dataset
def update_explanation_dataset(request, options = nil) -> ::Gapic::Operation
def update_explanation_dataset(model: nil, examples: nil) -> ::Gapic::Operation
Incrementally update the dataset used for an examples model.
def update_explanation_dataset(request, options = nil) -> ::Gapic::Operation
update_explanation_dataset
via a request object, either of type
UpdateExplanationDatasetRequest or an equivalent Hash.
- request (::Google::Cloud::AIPlatform::V1::UpdateExplanationDatasetRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def update_explanation_dataset(model: nil, examples: nil) -> ::Gapic::Operation
update_explanation_dataset
via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
-
model (::String) — Required. The resource name of the Model to update.
Format:
projects/{project}/locations/{location}/models/{model}
- examples (::Google::Cloud::AIPlatform::V1::Examples, ::Hash) — The example config containing the location of the dataset.
- (response, operation) — Access the result along with the RPC operation
- response (::Gapic::Operation)
- operation (::GRPC::ActiveCall::Operation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/ai_platform/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::AIPlatform::V1::ModelService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::AIPlatform::V1::UpdateExplanationDatasetRequest.new # Call the update_explanation_dataset method. result = client.update_explanation_dataset request # The returned object is of type Gapic::Operation. You can use it to # check the status of an operation, cancel it, or wait for results. # Here is how to wait for a response. result.wait_until_done! timeout: 60 if result.response? p result.response else puts "No response received." end
#update_model
def update_model(request, options = nil) -> ::Google::Cloud::AIPlatform::V1::Model
def update_model(model: nil, update_mask: nil) -> ::Google::Cloud::AIPlatform::V1::Model
Updates a Model.
def update_model(request, options = nil) -> ::Google::Cloud::AIPlatform::V1::Model
update_model
via a request object, either of type
UpdateModelRequest or an equivalent Hash.
- request (::Google::Cloud::AIPlatform::V1::UpdateModelRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def update_model(model: nil, update_mask: nil) -> ::Google::Cloud::AIPlatform::V1::Model
update_model
via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
-
model (::Google::Cloud::AIPlatform::V1::Model, ::Hash) —
Required. The Model which replaces the resource on the server. When Model Versioning is enabled, the model.name will be used to determine whether to update the model or model version.
- model.name with the @ value, e.g. models/123@1, refers to a version specific update.
- model.name without the @ value, e.g. models/123, refers to a model update.
- model.name with @-, e.g. models/123@-, refers to a model update.
- Supported model fields: display_name, description; supported version-specific fields: version_description. Labels are supported in both scenarios. Both the model labels and the version labels are merged when a model is returned. When updating labels, if the request is for model-specific update, model label gets updated. Otherwise, version labels get updated.
- A model name or model version name fields update mismatch will cause a precondition error.
- One request cannot update both the model and the version fields. You must update them separately.
-
update_mask (::Google::Protobuf::FieldMask, ::Hash) — Required. The update mask applies to the resource.
For the
FieldMask
definition, see google.protobuf.FieldMask.
- (response, operation) — Access the result along with the RPC operation
- response (::Google::Cloud::AIPlatform::V1::Model)
- operation (::GRPC::ActiveCall::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/ai_platform/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::AIPlatform::V1::ModelService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::AIPlatform::V1::UpdateModelRequest.new # Call the update_model method. result = client.update_model request # The returned object is of type Google::Cloud::AIPlatform::V1::Model. p result
#upload_model
def upload_model(request, options = nil) -> ::Gapic::Operation
def upload_model(parent: nil, parent_model: nil, model_id: nil, model: nil, service_account: nil) -> ::Gapic::Operation
Uploads a Model artifact into Vertex AI.
def upload_model(request, options = nil) -> ::Gapic::Operation
upload_model
via a request object, either of type
UploadModelRequest or an equivalent Hash.
- request (::Google::Cloud::AIPlatform::V1::UploadModelRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def upload_model(parent: nil, parent_model: nil, model_id: nil, model: nil, service_account: nil) -> ::Gapic::Operation
upload_model
via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
-
parent (::String) — Required. The resource name of the Location into which to upload the Model.
Format:
projects/{project}/locations/{location}
- parent_model (::String) — Optional. The resource name of the model into which to upload the version. Only specify this field when uploading a new version.
-
model_id (::String) — Optional. The ID to use for the uploaded Model, which will become the final
component of the model resource name.
This value may be up to 63 characters, and valid characters are
[a-z0-9_-]
. The first character cannot be a number or hyphen. - model (::Google::Cloud::AIPlatform::V1::Model, ::Hash) — Required. The Model to create.
-
service_account (::String) — Optional. The user-provided custom service account to use to do the model
upload. If empty, Vertex AI Service
Agent
will be used to access resources needed to upload the model. This account
must belong to the target project where the model is uploaded to, i.e., the
project specified in the
parent
field of this request and have necessary read permissions (to Google Cloud Storage, Artifact Registry, etc.).
- (response, operation) — Access the result along with the RPC operation
- response (::Gapic::Operation)
- operation (::GRPC::ActiveCall::Operation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/ai_platform/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::AIPlatform::V1::ModelService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::AIPlatform::V1::UploadModelRequest.new # Call the upload_model method. result = client.upload_model request # The returned object is of type Gapic::Operation. You can use it to # check the status of an operation, cancel it, or wait for results. # Here is how to wait for a response. result.wait_until_done! timeout: 60 if result.response? p result.response else puts "No response received." end