Reference documentation and code samples for the Cloud AutoML V1 API class Google::Cloud::AutoML::V1::AutoML::Rest::Client.
REST 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::Rest::Client.configure do |config| config.timeout = 10.0 end
#configure
def configure() { |config| ... } -> Client::Configuration
Configure 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::Operation
Creates a dataset.
def create_dataset(request, options = nil) -> ::Gapic::Operation
create_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::Operation
create_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.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Gapic::Operation)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the REST call 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::Rest::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 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
#create_model
def create_model(request, options = nil) -> ::Gapic::Operation
def create_model(parent: nil, model: nil) -> ::Gapic::Operation
Creates 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::Operation
create_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::Operation
create_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.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Gapic::Operation)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the REST call 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::Rest::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 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_dataset
def delete_dataset(request, options = nil) -> ::Gapic::Operation
def delete_dataset(name: nil) -> ::Gapic::Operation
Deletes 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::Operation
delete_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::Operation
delete_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.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Gapic::Operation)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the REST call 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::Rest::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 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.
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::Operation
delete_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::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. Resource name of the model being deleted.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Gapic::Operation)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the REST call 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::Rest::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 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
#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::Operation
Deploys 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::Operation
deploy_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::Operation
deploy_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.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Gapic::Operation)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the REST call 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::Rest::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 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_data
def export_data(request, options = nil) -> ::Gapic::Operation
def export_data(name: nil, output_config: nil) -> ::Gapic::Operation
Exports 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::Operation
export_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::Operation
export_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.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Gapic::Operation)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the REST call 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::Rest::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 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, "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::Operation
export_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::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::AutoML::V1::ModelExportOutputConfig, ::Hash) — Required. The desired output location and configuration.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Gapic::Operation)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the REST call 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::Rest::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 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_annotation_spec
def get_annotation_spec(request, options = nil) -> ::Google::Cloud::AutoML::V1::AnnotationSpec
def get_annotation_spec(name: nil) -> ::Google::Cloud::AutoML::V1::AnnotationSpec
Gets an annotation spec.
def get_annotation_spec(request, options = nil) -> ::Google::Cloud::AutoML::V1::AnnotationSpec
get_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::AnnotationSpec
get_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.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::AutoML::V1::AnnotationSpec)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call 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::Rest::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::Dataset
Gets a dataset.
def get_dataset(request, options = nil) -> ::Google::Cloud::AutoML::V1::Dataset
get_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::Dataset
get_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.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::AutoML::V1::Dataset)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call 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::Rest::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::Model
Gets a model.
def get_model(request, options = nil) -> ::Google::Cloud::AutoML::V1::Model
get_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::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. Resource name of the model.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::AutoML::V1::Model)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call 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::Rest::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::ModelEvaluation
Gets a model evaluation.
def get_model_evaluation(request, options = nil) -> ::Google::Cloud::AutoML::V1::ModelEvaluation
get_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::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. Resource name for the model evaluation.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::AutoML::V1::ModelEvaluation)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call 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::Rest::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::Operation
Imports 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::Operation
import_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::Operation
import_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.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Gapic::Operation)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the REST call 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::Rest::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 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
#initialize
def initialize() { |config| ... } -> Client
Create a new AutoMl REST 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::Rest::Client.new # Create a client using a custom configuration client = ::Google::Cloud::AutoML::V1::AutoML::Rest::Client.new do |config| config.timeout = 10.0 end
#list_datasets
def list_datasets(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::AutoML::V1::Dataset>
def list_datasets(parent: nil, filter: nil, page_size: nil, page_token: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::AutoML::V1::Dataset>
Lists datasets in a project.
def list_datasets(request, options = nil) -> ::Gapic::Rest::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::Rest::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.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Gapic::Rest::PagedEnumerable<::Google::Cloud::AutoML::V1::Dataset>)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Rest::PagedEnumerable<::Google::Cloud::AutoML::V1::Dataset>)
- (::Google::Cloud::Error) — if the REST call 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::Rest::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 elements, and API calls will be issued to fetch pages as needed. result.each do |item| # Each element is of type ::Google::Cloud::AutoML::V1::Dataset. p item end
#list_model_evaluations
def list_model_evaluations(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::AutoML::V1::ModelEvaluation>
def list_model_evaluations(parent: nil, filter: nil, page_size: nil, page_token: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::AutoML::V1::ModelEvaluation>
Lists model evaluations.
def list_model_evaluations(request, options = nil) -> ::Gapic::Rest::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::Rest::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.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Gapic::Rest::PagedEnumerable<::Google::Cloud::AutoML::V1::ModelEvaluation>)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Rest::PagedEnumerable<::Google::Cloud::AutoML::V1::ModelEvaluation>)
- (::Google::Cloud::Error) — if the REST call 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::Rest::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 elements, and API calls will be issued to fetch pages as needed. result.each do |item| # Each element is of type ::Google::Cloud::AutoML::V1::ModelEvaluation. p item end
#list_models
def list_models(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::AutoML::V1::Model>
def list_models(parent: nil, filter: nil, page_size: nil, page_token: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::AutoML::V1::Model>
Lists models.
def list_models(request, options = nil) -> ::Gapic::Rest::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::Rest::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.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Gapic::Rest::PagedEnumerable<::Google::Cloud::AutoML::V1::Model>)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Rest::PagedEnumerable<::Google::Cloud::AutoML::V1::Model>)
- (::Google::Cloud::Error) — if the REST call 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::Rest::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 elements, and API calls will be issued to fetch pages as needed. result.each do |item| # Each element is of type ::Google::Cloud::AutoML::V1::Model. p item end
#operations_client
def operations_client() -> ::Google::Cloud::AutoML::V1::AutoML::Rest::Operations
Get the associated client for long-running operations.
#undeploy_model
def undeploy_model(request, options = nil) -> ::Gapic::Operation
def undeploy_model(name: nil) -> ::Gapic::Operation
Undeploys 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::Operation
undeploy_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::Operation
undeploy_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.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Gapic::Operation)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the REST call 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::Rest::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 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_dataset
def update_dataset(request, options = nil) -> ::Google::Cloud::AutoML::V1::Dataset
def update_dataset(dataset: nil, update_mask: nil) -> ::Google::Cloud::AutoML::V1::Dataset
Updates a dataset.
def update_dataset(request, options = nil) -> ::Google::Cloud::AutoML::V1::Dataset
update_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::Dataset
update_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.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::AutoML::V1::Dataset)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call 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::Rest::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::Model
Updates a model.
def update_model(request, options = nil) -> ::Google::Cloud::AutoML::V1::Model
update_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::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::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.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::AutoML::V1::Model)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call 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::Rest::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