Reference documentation and code samples for the Cloud AutoML V1 API class Google::Cloud::AutoML::V1::AutoML::Client.
Client for the AutoMl service.
AutoML Server API.
The resource names are assigned by the server. The server never reuses names that it has created after the resources with those names are deleted.
An ID of a resource is the last element of the item's resource name. For
projects/{project_id}/locations/{location_id}/datasets/{dataset_id}, then
the id for the item is {dataset_id}.
Currently the only supported location_id is "us-central1".
On any input that is documented to expect a string parameter in snake_case or dash-case, either of those cases is accepted.
Inherits
- Object
Methods
.configure
def self.configure() { |config| ... } -> Client::Configuration- (config) — Configure the Client client.
- config (Client::Configuration)
# Modify the configuration for all AutoMl clients ::Google::Cloud::AutoML::V1::AutoML::Client.configure do |config| config.timeout = 10.0 end
#configure
def configure() { |config| ... } -> Client::ConfigurationConfigure the AutoMl 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)
#create_dataset
def create_dataset(request, options = nil) -> ::Gapic::Operation
def create_dataset(parent: nil, dataset: nil) -> ::Gapic::OperationCreates a dataset.
def create_dataset(request, options = nil) -> ::Gapic::Operationcreate_dataset via a request object, either of type
CreateDatasetRequest or an equivalent Hash.
- request (::Google::Cloud::AutoML::V1::CreateDatasetRequest, ::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 create_dataset(parent: nil, dataset: nil) -> ::Gapic::Operationcreate_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).
- parent (::String) — Required. The resource name of the project to create the dataset for.
- dataset (::Google::Cloud::AutoML::V1::Dataset, ::Hash) — Required. The dataset 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/automl/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::AutoML::V1::AutoML::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::AutoML::V1::CreateDatasetRequest.new # Call the create_dataset method. result = client.create_dataset 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
#create_model
def create_model(request, options = nil) -> ::Gapic::Operation
def create_model(parent: nil, model: nil) -> ::Gapic::OperationCreates a model. Returns a Model in the response field when it completes. When you create a model, several model evaluations are created for it: a global evaluation, and one evaluation for each annotation spec.
def create_model(request, options = nil) -> ::Gapic::Operationcreate_model via a request object, either of type
CreateModelRequest or an equivalent Hash.
- request (::Google::Cloud::AutoML::V1::CreateModelRequest, ::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 create_model(parent: nil, model: nil) -> ::Gapic::Operationcreate_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. Resource name of the parent project where the model is being created.
- model (::Google::Cloud::AutoML::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/automl/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::AutoML::V1::AutoML::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::AutoML::V1::CreateModelRequest.new # Call the create_model method. result = client.create_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
#delete_dataset
def delete_dataset(request, options = nil) -> ::Gapic::Operation
def delete_dataset(name: nil) -> ::Gapic::OperationDeletes a dataset and all of its contents.
Returns empty response in the
response field when it completes,
and delete_details in the
metadata field.
def delete_dataset(request, options = nil) -> ::Gapic::Operationdelete_dataset via a request object, either of type
DeleteDatasetRequest or an equivalent Hash.
- request (::Google::Cloud::AutoML::V1::DeleteDatasetRequest, ::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_dataset(name: nil) -> ::Gapic::Operationdelete_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).
- name (::String) — Required. The resource name of the dataset to delete.
- (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/automl/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::AutoML::V1::AutoML::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::AutoML::V1::DeleteDatasetRequest.new # Call the delete_dataset method. result = client.delete_dataset 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
#delete_model
def delete_model(request, options = nil) -> ::Gapic::Operation
def delete_model(name: nil) -> ::Gapic::OperationDeletes a model.
Returns google.protobuf.Empty in the
response field when it completes,
and delete_details in the
metadata field.
def delete_model(request, options = nil) -> ::Gapic::Operationdelete_model via a request object, either of type
DeleteModelRequest or an equivalent Hash.
- request (::Google::Cloud::AutoML::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::Operationdelete_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. Resource name of the model being deleted.
- (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/automl/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::AutoML::V1::AutoML::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::AutoML::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
#deploy_model
def deploy_model(request, options = nil) -> ::Gapic::Operation
def deploy_model(image_object_detection_model_deployment_metadata: nil, image_classification_model_deployment_metadata: nil, name: nil) -> ::Gapic::OperationDeploys a model. If a model is already deployed, deploying it with the same parameters has no effect. Deploying with different parametrs (as e.g. changing [node_number][google.cloud.automl.v1p1beta.ImageObjectDetectionModelDeploymentMetadata.node_number]) will reset the deployment state without pausing the model's availability.
Only applicable for Text Classification, Image Object Detection , Tables, and Image Segmentation; all other domains manage deployment automatically.
Returns an empty response in the response field when it completes.
def deploy_model(request, options = nil) -> ::Gapic::Operationdeploy_model via a request object, either of type
DeployModelRequest or an equivalent Hash.
- request (::Google::Cloud::AutoML::V1::DeployModelRequest, ::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 deploy_model(image_object_detection_model_deployment_metadata: nil, image_classification_model_deployment_metadata: nil, name: nil) -> ::Gapic::Operationdeploy_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).
- image_object_detection_model_deployment_metadata (::Google::Cloud::AutoML::V1::ImageObjectDetectionModelDeploymentMetadata, ::Hash) — Model deployment metadata specific to Image Object Detection.
- image_classification_model_deployment_metadata (::Google::Cloud::AutoML::V1::ImageClassificationModelDeploymentMetadata, ::Hash) — Model deployment metadata specific to Image Classification.
- name (::String) — Required. Resource name of the model to deploy.
- (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/automl/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::AutoML::V1::AutoML::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::AutoML::V1::DeployModelRequest.new # Call the deploy_model method. result = client.deploy_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_data
def export_data(request, options = nil) -> ::Gapic::Operation
def export_data(name: nil, output_config: nil) -> ::Gapic::OperationExports dataset's data to the provided output location. Returns an empty response in the response field when it completes.
def export_data(request, options = nil) -> ::Gapic::Operationexport_data via a request object, either of type
ExportDataRequest or an equivalent Hash.
- request (::Google::Cloud::AutoML::V1::ExportDataRequest, ::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_data(name: nil, output_config: nil) -> ::Gapic::Operationexport_data 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 dataset.
- output_config (::Google::Cloud::AutoML::V1::OutputConfig, ::Hash) — Required. The desired output location.
- (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/automl/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::AutoML::V1::AutoML::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::AutoML::V1::ExportDataRequest.new # Call the export_data method. result = client.export_data 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::OperationExports a trained, "export-able", model to a user specified Google Cloud Storage location. A model is considered export-able if and only if it has an export format defined for it in ModelExportOutputConfig.
Returns an empty response in the response field when it completes.
def export_model(request, options = nil) -> ::Gapic::Operationexport_model via a request object, either of type
ExportModelRequest or an equivalent Hash.
- request (::Google::Cloud::AutoML::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::Operationexport_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::AutoML::V1::ModelExportOutputConfig, ::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/automl/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::AutoML::V1::AutoML::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::AutoML::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_annotation_spec
def get_annotation_spec(request, options = nil) -> ::Google::Cloud::AutoML::V1::AnnotationSpec
def get_annotation_spec(name: nil) -> ::Google::Cloud::AutoML::V1::AnnotationSpecGets an annotation spec.
def get_annotation_spec(request, options = nil) -> ::Google::Cloud::AutoML::V1::AnnotationSpecget_annotation_spec via a request object, either of type
GetAnnotationSpecRequest or an equivalent Hash.
- request (::Google::Cloud::AutoML::V1::GetAnnotationSpecRequest, ::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_annotation_spec(name: nil) -> ::Google::Cloud::AutoML::V1::AnnotationSpecget_annotation_spec 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 annotation spec to retrieve.
- (response, operation) — Access the result along with the RPC operation
- response (::Google::Cloud::AutoML::V1::AnnotationSpec)
- operation (::GRPC::ActiveCall::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/automl/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::AutoML::V1::AutoML::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::AutoML::V1::GetAnnotationSpecRequest.new # Call the get_annotation_spec method. result = client.get_annotation_spec request # The returned object is of type Google::Cloud::AutoML::V1::AnnotationSpec. p result
#get_dataset
def get_dataset(request, options = nil) -> ::Google::Cloud::AutoML::V1::Dataset
def get_dataset(name: nil) -> ::Google::Cloud::AutoML::V1::DatasetGets a dataset.
def get_dataset(request, options = nil) -> ::Google::Cloud::AutoML::V1::Datasetget_dataset via a request object, either of type
GetDatasetRequest or an equivalent Hash.
- request (::Google::Cloud::AutoML::V1::GetDatasetRequest, ::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_dataset(name: nil) -> ::Google::Cloud::AutoML::V1::Datasetget_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).
- name (::String) — Required. The resource name of the dataset to retrieve.
- (response, operation) — Access the result along with the RPC operation
- response (::Google::Cloud::AutoML::V1::Dataset)
- operation (::GRPC::ActiveCall::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/automl/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::AutoML::V1::AutoML::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::AutoML::V1::GetDatasetRequest.new # Call the get_dataset method. result = client.get_dataset request # The returned object is of type Google::Cloud::AutoML::V1::Dataset. p result
#get_model
def get_model(request, options = nil) -> ::Google::Cloud::AutoML::V1::Model
def get_model(name: nil) -> ::Google::Cloud::AutoML::V1::ModelGets a model.
def get_model(request, options = nil) -> ::Google::Cloud::AutoML::V1::Modelget_model via a request object, either of type
GetModelRequest or an equivalent Hash.
- request (::Google::Cloud::AutoML::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::AutoML::V1::Modelget_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. Resource name of the model.
- (response, operation) — Access the result along with the RPC operation
- response (::Google::Cloud::AutoML::V1::Model)
- operation (::GRPC::ActiveCall::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/automl/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::AutoML::V1::AutoML::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::AutoML::V1::GetModelRequest.new # Call the get_model method. result = client.get_model request # The returned object is of type Google::Cloud::AutoML::V1::Model. p result
#get_model_evaluation
def get_model_evaluation(request, options = nil) -> ::Google::Cloud::AutoML::V1::ModelEvaluation
def get_model_evaluation(name: nil) -> ::Google::Cloud::AutoML::V1::ModelEvaluationGets a model evaluation.
def get_model_evaluation(request, options = nil) -> ::Google::Cloud::AutoML::V1::ModelEvaluationget_model_evaluation via a request object, either of type
GetModelEvaluationRequest or an equivalent Hash.
- request (::Google::Cloud::AutoML::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::AutoML::V1::ModelEvaluationget_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. Resource name for the model evaluation.
- (response, operation) — Access the result along with the RPC operation
- response (::Google::Cloud::AutoML::V1::ModelEvaluation)
- operation (::GRPC::ActiveCall::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/automl/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::AutoML::V1::AutoML::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::AutoML::V1::GetModelEvaluationRequest.new # Call the get_model_evaluation method. result = client.get_model_evaluation request # The returned object is of type Google::Cloud::AutoML::V1::ModelEvaluation. p result
#import_data
def import_data(request, options = nil) -> ::Gapic::Operation
def import_data(name: nil, input_config: nil) -> ::Gapic::OperationImports data into a dataset. For Tables this method can only be called on an empty Dataset.
For Tables:
- A schema_inference_version parameter must be explicitly set. Returns an empty response in the response field when it completes.
def import_data(request, options = nil) -> ::Gapic::Operationimport_data via a request object, either of type
ImportDataRequest or an equivalent Hash.
- request (::Google::Cloud::AutoML::V1::ImportDataRequest, ::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_data(name: nil, input_config: nil) -> ::Gapic::Operationimport_data 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. Dataset name. Dataset must already exist. All imported annotations and examples will be added.
- input_config (::Google::Cloud::AutoML::V1::InputConfig, ::Hash) — Required. The desired input location and its domain specific semantics, if any.
- (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/automl/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::AutoML::V1::AutoML::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::AutoML::V1::ImportDataRequest.new # Call the import_data method. result = client.import_data 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
#initialize
def initialize() { |config| ... } -> ClientCreate a new AutoMl client object.
- (config) — Configure the AutoMl client.
- config (Client::Configuration)
- (Client) — a new instance of Client
# Create a client using the default configuration client = ::Google::Cloud::AutoML::V1::AutoML::Client.new # Create a client using a custom configuration client = ::Google::Cloud::AutoML::V1::AutoML::Client.new do |config| config.timeout = 10.0 end
#list_datasets
def list_datasets(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::AutoML::V1::Dataset>
def list_datasets(parent: nil, filter: nil, page_size: nil, page_token: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::AutoML::V1::Dataset>Lists datasets in a project.
def list_datasets(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::AutoML::V1::Dataset>list_datasets via a request object, either of type
ListDatasetsRequest or an equivalent Hash.
- request (::Google::Cloud::AutoML::V1::ListDatasetsRequest, ::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_datasets(parent: nil, filter: nil, page_size: nil, page_token: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::AutoML::V1::Dataset>list_datasets 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 project from which to list datasets.
-
filter (::String) —
An expression for filtering the results of the request.
dataset_metadata- for existence of the case (e.g.image_classification_dataset_metadata:*). Some examples of using the filter are:translation_dataset_metadata:*--> The dataset hastranslation_dataset_metadata.
- page_size (::Integer) — Requested page size. Server may return fewer results than requested. If unspecified, server will pick a default size.
- page_token (::String) — A token identifying a page of results for the server to return Typically obtained via ListDatasetsResponse.next_page_token of the previous AutoMl.ListDatasets call.
- (response, operation) — Access the result along with the RPC operation
- response (::Gapic::PagedEnumerable<::Google::Cloud::AutoML::V1::Dataset>)
- operation (::GRPC::ActiveCall::Operation)
- (::Gapic::PagedEnumerable<::Google::Cloud::AutoML::V1::Dataset>)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/automl/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::AutoML::V1::AutoML::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::AutoML::V1::ListDatasetsRequest.new # Call the list_datasets method. result = client.list_datasets 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::AutoML::V1::Dataset. p response end
#list_model_evaluations
def list_model_evaluations(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::AutoML::V1::ModelEvaluation>
def list_model_evaluations(parent: nil, filter: nil, page_size: nil, page_token: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::AutoML::V1::ModelEvaluation>Lists model evaluations.
def list_model_evaluations(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::AutoML::V1::ModelEvaluation>list_model_evaluations via a request object, either of type
ListModelEvaluationsRequest or an equivalent Hash.
- request (::Google::Cloud::AutoML::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) -> ::Gapic::PagedEnumerable<::Google::Cloud::AutoML::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. Resource name of the model to list the model evaluations for. If modelId is set as "-", this will list model evaluations from across all models of the parent location.
-
filter (::String) —
Required. An expression for filtering the results of the request.
annotation_spec_id- for =, != or existence. See example below for the last.
Some examples of using the filter are:
annotation_spec_id!=4--> The model evaluation was done for annotation spec with ID different than 4.NOT annotation_spec_id:*--> The model evaluation was done for aggregate of all annotation specs.
- page_size (::Integer) — Requested page size.
- page_token (::String) — A token identifying a page of results for the server to return. Typically obtained via ListModelEvaluationsResponse.next_page_token of the previous AutoMl.ListModelEvaluations call.
- (response, operation) — Access the result along with the RPC operation
- response (::Gapic::PagedEnumerable<::Google::Cloud::AutoML::V1::ModelEvaluation>)
- operation (::GRPC::ActiveCall::Operation)
- (::Gapic::PagedEnumerable<::Google::Cloud::AutoML::V1::ModelEvaluation>)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/automl/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::AutoML::V1::AutoML::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::AutoML::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::AutoML::V1::ModelEvaluation. p response end
#list_models
def list_models(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::AutoML::V1::Model>
def list_models(parent: nil, filter: nil, page_size: nil, page_token: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::AutoML::V1::Model>Lists models.
def list_models(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::AutoML::V1::Model>list_models via a request object, either of type
ListModelsRequest or an equivalent Hash.
- request (::Google::Cloud::AutoML::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) -> ::Gapic::PagedEnumerable<::Google::Cloud::AutoML::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. Resource name of the project, from which to list the models.
-
filter (::String) —
An expression for filtering the results of the request.
model_metadata- for existence of the case (e.g.video_classification_model_metadata:*).dataset_id- for = or !=. Some examples of using the filter are:image_classification_model_metadata:*--> The model hasimage_classification_model_metadata.dataset_id=5--> The model was created from a dataset with ID 5.
- page_size (::Integer) — Requested page size.
- page_token (::String) — A token identifying a page of results for the server to return Typically obtained via ListModelsResponse.next_page_token of the previous AutoMl.ListModels call.
- (response, operation) — Access the result along with the RPC operation
- response (::Gapic::PagedEnumerable<::Google::Cloud::AutoML::V1::Model>)
- operation (::GRPC::ActiveCall::Operation)
- (::Gapic::PagedEnumerable<::Google::Cloud::AutoML::V1::Model>)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/automl/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::AutoML::V1::AutoML::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::AutoML::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::AutoML::V1::Model. p response end
#operations_client
def operations_client() -> ::Google::Cloud::AutoML::V1::AutoML::OperationsGet the associated client for long-running operations.
#undeploy_model
def undeploy_model(request, options = nil) -> ::Gapic::Operation
def undeploy_model(name: nil) -> ::Gapic::OperationUndeploys a model. If the model is not deployed this method has no effect.
Only applicable for Text Classification, Image Object Detection and Tables; all other domains manage deployment automatically.
Returns an empty response in the response field when it completes.
def undeploy_model(request, options = nil) -> ::Gapic::Operationundeploy_model via a request object, either of type
UndeployModelRequest or an equivalent Hash.
- request (::Google::Cloud::AutoML::V1::UndeployModelRequest, ::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 undeploy_model(name: nil) -> ::Gapic::Operationundeploy_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. Resource name of the model to undeploy.
- (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/automl/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::AutoML::V1::AutoML::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::AutoML::V1::UndeployModelRequest.new # Call the undeploy_model method. result = client.undeploy_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
#update_dataset
def update_dataset(request, options = nil) -> ::Google::Cloud::AutoML::V1::Dataset
def update_dataset(dataset: nil, update_mask: nil) -> ::Google::Cloud::AutoML::V1::DatasetUpdates a dataset.
def update_dataset(request, options = nil) -> ::Google::Cloud::AutoML::V1::Datasetupdate_dataset via a request object, either of type
UpdateDatasetRequest or an equivalent Hash.
- request (::Google::Cloud::AutoML::V1::UpdateDatasetRequest, ::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_dataset(dataset: nil, update_mask: nil) -> ::Google::Cloud::AutoML::V1::Datasetupdate_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).
- dataset (::Google::Cloud::AutoML::V1::Dataset, ::Hash) — Required. The dataset which replaces the resource on the server.
- update_mask (::Google::Protobuf::FieldMask, ::Hash) — Required. The update mask applies to the resource.
- (response, operation) — Access the result along with the RPC operation
- response (::Google::Cloud::AutoML::V1::Dataset)
- operation (::GRPC::ActiveCall::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/automl/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::AutoML::V1::AutoML::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::AutoML::V1::UpdateDatasetRequest.new # Call the update_dataset method. result = client.update_dataset request # The returned object is of type Google::Cloud::AutoML::V1::Dataset. p result
#update_model
def update_model(request, options = nil) -> ::Google::Cloud::AutoML::V1::Model
def update_model(model: nil, update_mask: nil) -> ::Google::Cloud::AutoML::V1::ModelUpdates a model.
def update_model(request, options = nil) -> ::Google::Cloud::AutoML::V1::Modelupdate_model via a request object, either of type
UpdateModelRequest or an equivalent Hash.
- request (::Google::Cloud::AutoML::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::AutoML::V1::Modelupdate_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::AutoML::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.
- (response, operation) — Access the result along with the RPC operation
- response (::Google::Cloud::AutoML::V1::Model)
- operation (::GRPC::ActiveCall::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/automl/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::AutoML::V1::AutoML::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::AutoML::V1::UpdateModelRequest.new # Call the update_model method. result = client.update_model request # The returned object is of type Google::Cloud::AutoML::V1::Model. p result