- 0.53.0 (latest)
- 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
#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)
#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 this # object to check the status of an operation, cancel it, or wait # for results. Here is how to block until completion: result.wait_until_done! timeout: 60 if result.response? p result.response else puts "Error!" 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.
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.
- 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 this # object to check the status of an operation, cancel it, or wait # for results. Here is how to block until completion: result.wait_until_done! timeout: 60 if result.response? p result.response else puts "Error!" 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}
- (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
#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 all elements by calling #each, and the enumerable # will lazily make API calls to fetch subsequent pages. Other # methods are also available for managing paging directly. result.each do |response| # Each element is of type ::Google::Cloud::AIPlatform::V1::ModelEvaluationSlice. p response 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 all elements by calling #each, and the enumerable # will lazily make API calls to fetch subsequent pages. Other # methods are also available for managing paging directly. result.each do |response| # Each element is of type ::Google::Cloud::AIPlatform::V1::ModelEvaluation. p response 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.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"
.
Some examples:
model=1234
displayName="myDisplayName"
labels.myKey="myValue"
- 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 all elements by calling #each, and the enumerable # will lazily make API calls to fetch subsequent pages. Other # methods are also available for managing paging directly. result.each do |response| # Each element is of type ::Google::Cloud::AIPlatform::V1::Model. p response end
#operations_client
def operations_client() -> ::Google::Cloud::AIPlatform::V1::ModelService::Operations
Get the associated client for long-running operations.
#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.
-
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, model: 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, model: 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}
- model (::Google::Cloud::AIPlatform::V1::Model, ::Hash) — Required. The Model to create.
- (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 this # object to check the status of an operation, cancel it, or wait # for results. Here is how to block until completion: result.wait_until_done! timeout: 60 if result.response? p result.response else puts "Error!" end