Reference documentation and code samples for the Cloud AutoML V1beta1 API class Google::Cloud::AutoML::V1beta1::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 kebab-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::V1beta1::AutoML::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) -> ::Google::Cloud::AutoML::V1beta1::Dataset
def create_dataset(parent: nil, dataset: nil) -> ::Google::Cloud::AutoML::V1beta1::Dataset
Creates a dataset.
def create_dataset(request, options = nil) -> ::Google::Cloud::AutoML::V1beta1::Dataset
create_dataset
via a request object, either of type
CreateDatasetRequest or an equivalent Hash.
- request (::Google::Cloud::AutoML::V1beta1::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) -> ::Google::Cloud::AutoML::V1beta1::Dataset
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::V1beta1::Dataset, ::Hash) — Required. The dataset to create.
- (response, operation) — Access the result along with the RPC operation
- response (::Google::Cloud::AutoML::V1beta1::Dataset)
- operation (::GRPC::ActiveCall::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/automl/v1beta1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::AutoML::V1beta1::AutoML::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::AutoML::V1beta1::CreateDatasetRequest.new # Call the create_dataset method. result = client.create_dataset request # The returned object is of type Google::Cloud::AutoML::V1beta1::Dataset. p result
#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::V1beta1::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::V1beta1::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/v1beta1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::AutoML::V1beta1::AutoML::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::AutoML::V1beta1::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::V1beta1::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.
- (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/v1beta1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::AutoML::V1beta1::AutoML::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::AutoML::V1beta1::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::V1beta1::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.
- (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/v1beta1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::AutoML::V1beta1::AutoML::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::AutoML::V1beta1::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.v1beta1.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::V1beta1::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