Reference documentation and code samples for the AI Platform Data Labeling Service V1beta1 API class Google::Cloud::DataLabeling::V1beta1::DataLabelingService::Client.
Client for the DataLabelingService service.
Service for the AI Platform Data Labeling API.
Inherits
- Object
Methods
.configure
def self.configure() { |config| ... } -> Client::Configuration
Configure the DataLabelingService Client class.
See Configuration for a description of the configuration fields.
- (config) — Configure the Client client.
- config (Client::Configuration)
# Modify the configuration for all DataLabelingService clients ::Google::Cloud::DataLabeling::V1beta1::DataLabelingService::Client.configure do |config| config.timeout = 10.0 end
#configure
def configure() { |config| ... } -> Client::Configuration
Configure the DataLabelingService 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_annotation_spec_set
def create_annotation_spec_set(request, options = nil) -> ::Google::Cloud::DataLabeling::V1beta1::AnnotationSpecSet
def create_annotation_spec_set(parent: nil, annotation_spec_set: nil) -> ::Google::Cloud::DataLabeling::V1beta1::AnnotationSpecSet
Creates an annotation spec set by providing a set of labels.
def create_annotation_spec_set(request, options = nil) -> ::Google::Cloud::DataLabeling::V1beta1::AnnotationSpecSet
create_annotation_spec_set
via a request object, either of type
CreateAnnotationSpecSetRequest or an equivalent Hash.
- request (::Google::Cloud::DataLabeling::V1beta1::CreateAnnotationSpecSetRequest, ::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_annotation_spec_set(parent: nil, annotation_spec_set: nil) -> ::Google::Cloud::DataLabeling::V1beta1::AnnotationSpecSet
create_annotation_spec_set
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. AnnotationSpecSet resource parent, format: projects/{project_id}
- annotation_spec_set (::Google::Cloud::DataLabeling::V1beta1::AnnotationSpecSet, ::Hash) — Required. Annotation spec set to create. Annotation specs must be included. Only one annotation spec will be accepted for annotation specs with same display_name.
- (response, operation) — Access the result along with the RPC operation
- response (::Google::Cloud::DataLabeling::V1beta1::AnnotationSpecSet)
- operation (::GRPC::ActiveCall::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/data_labeling/v1beta1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::DataLabeling::V1beta1::DataLabelingService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::DataLabeling::V1beta1::CreateAnnotationSpecSetRequest.new # Call the create_annotation_spec_set method. result = client.create_annotation_spec_set request # The returned object is of type Google::Cloud::DataLabeling::V1beta1::AnnotationSpecSet. p result
#create_dataset
def create_dataset(request, options = nil) -> ::Google::Cloud::DataLabeling::V1beta1::Dataset
def create_dataset(parent: nil, dataset: nil) -> ::Google::Cloud::DataLabeling::V1beta1::Dataset
Creates dataset. If success return a Dataset resource.
def create_dataset(request, options = nil) -> ::Google::Cloud::DataLabeling::V1beta1::Dataset
create_dataset
via a request object, either of type
CreateDatasetRequest or an equivalent Hash.
- request (::Google::Cloud::DataLabeling::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::DataLabeling::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. Dataset resource parent, format: projects/{project_id}
- dataset (::Google::Cloud::DataLabeling::V1beta1::Dataset, ::Hash) — Required. The dataset to be created.
- (response, operation) — Access the result along with the RPC operation
- response (::Google::Cloud::DataLabeling::V1beta1::Dataset)
- operation (::GRPC::ActiveCall::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/data_labeling/v1beta1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::DataLabeling::V1beta1::DataLabelingService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::DataLabeling::V1beta1::CreateDatasetRequest.new # Call the create_dataset method. result = client.create_dataset request # The returned object is of type Google::Cloud::DataLabeling::V1beta1::Dataset. p result
#create_evaluation_job
def create_evaluation_job(request, options = nil) -> ::Google::Cloud::DataLabeling::V1beta1::EvaluationJob
def create_evaluation_job(parent: nil, job: nil) -> ::Google::Cloud::DataLabeling::V1beta1::EvaluationJob
Creates an evaluation job.
def create_evaluation_job(request, options = nil) -> ::Google::Cloud::DataLabeling::V1beta1::EvaluationJob
create_evaluation_job
via a request object, either of type
CreateEvaluationJobRequest or an equivalent Hash.
- request (::Google::Cloud::DataLabeling::V1beta1::CreateEvaluationJobRequest, ::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_evaluation_job(parent: nil, job: nil) -> ::Google::Cloud::DataLabeling::V1beta1::EvaluationJob
create_evaluation_job
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. Evaluation job resource parent. Format: "projects/{project_id}"
- job (::Google::Cloud::DataLabeling::V1beta1::EvaluationJob, ::Hash) — Required. The evaluation job to create.
- (response, operation) — Access the result along with the RPC operation
- response (::Google::Cloud::DataLabeling::V1beta1::EvaluationJob)
- operation (::GRPC::ActiveCall::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/data_labeling/v1beta1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::DataLabeling::V1beta1::DataLabelingService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::DataLabeling::V1beta1::CreateEvaluationJobRequest.new # Call the create_evaluation_job method. result = client.create_evaluation_job request # The returned object is of type Google::Cloud::DataLabeling::V1beta1::EvaluationJob. p result
#create_instruction
def create_instruction(request, options = nil) -> ::Gapic::Operation
def create_instruction(parent: nil, instruction: nil) -> ::Gapic::Operation
Creates an instruction for how data should be labeled.
def create_instruction(request, options = nil) -> ::Gapic::Operation
create_instruction
via a request object, either of type
CreateInstructionRequest or an equivalent Hash.
- request (::Google::Cloud::DataLabeling::V1beta1::CreateInstructionRequest, ::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_instruction(parent: nil, instruction: nil) -> ::Gapic::Operation
create_instruction
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. Instruction resource parent, format: projects/{project_id}
- instruction (::Google::Cloud::DataLabeling::V1beta1::Instruction, ::Hash) — Required. Instruction of how to perform the labeling task.
- (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/data_labeling/v1beta1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::DataLabeling::V1beta1::DataLabelingService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::DataLabeling::V1beta1::CreateInstructionRequest.new # Call the create_instruction method. result = client.create_instruction 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_annotated_dataset
def delete_annotated_dataset(request, options = nil) -> ::Google::Protobuf::Empty
def delete_annotated_dataset(name: nil) -> ::Google::Protobuf::Empty
Deletes an annotated dataset by resource name.
def delete_annotated_dataset(request, options = nil) -> ::Google::Protobuf::Empty
delete_annotated_dataset
via a request object, either of type
Google::Cloud::DataLabeling::V1beta1::DeleteAnnotatedDatasetRequest or an equivalent Hash.
- request (::Google::Cloud::DataLabeling::V1beta1::DeleteAnnotatedDatasetRequest, ::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_annotated_dataset(name: nil) -> ::Google::Protobuf::Empty
delete_annotated_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. Name of the annotated dataset to delete, format: projects/{project_id}/datasets/{dataset_id}/annotatedDatasets/ {annotated_dataset_id}
- (response, operation) — Access the result along with the RPC operation
- response (::Google::Protobuf::Empty)
- operation (::GRPC::ActiveCall::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/data_labeling/v1beta1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::DataLabeling::V1beta1::DataLabelingService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::DataLabeling::V1beta1::DeleteAnnotatedDatasetRequest.new # Call the delete_annotated_dataset method. result = client.delete_annotated_dataset request # The returned object is of type Google::Protobuf::Empty. p result
#delete_annotation_spec_set
def delete_annotation_spec_set(request, options = nil) -> ::Google::Protobuf::Empty
def delete_annotation_spec_set(name: nil) -> ::Google::Protobuf::Empty
Deletes an annotation spec set by resource name.
def delete_annotation_spec_set(request, options = nil) -> ::Google::Protobuf::Empty
delete_annotation_spec_set
via a request object, either of type
Google::Cloud::DataLabeling::V1beta1::DeleteAnnotationSpecSetRequest or an equivalent Hash.
- request (::Google::Cloud::DataLabeling::V1beta1::DeleteAnnotationSpecSetRequest, ::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_annotation_spec_set(name: nil) -> ::Google::Protobuf::Empty
delete_annotation_spec_set
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. AnnotationSpec resource name, format:
projects/{project_id}/annotationSpecSets/{annotation_spec_set_id}
.
- (response, operation) — Access the result along with the RPC operation
- response (::Google::Protobuf::Empty)
- operation (::GRPC::ActiveCall::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/data_labeling/v1beta1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::DataLabeling::V1beta1::DataLabelingService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::DataLabeling::V1beta1::DeleteAnnotationSpecSetRequest.new # Call the delete_annotation_spec_set method. result = client.delete_annotation_spec_set request # The returned object is of type Google::Protobuf::Empty. p result
#delete_dataset
def delete_dataset(request, options = nil) -> ::Google::Protobuf::Empty
def delete_dataset(name: nil) -> ::Google::Protobuf::Empty
Deletes a dataset by resource name.
def delete_dataset(request, options = nil) -> ::Google::Protobuf::Empty
delete_dataset
via a request object, either of type
Google::Cloud::DataLabeling::V1beta1::DeleteDatasetRequest or an equivalent Hash.
- request (::Google::Cloud::DataLabeling::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) -> ::Google::Protobuf::Empty
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. Dataset resource name, format: projects/{project_id}/datasets/{dataset_id}
- (response, operation) — Access the result along with the RPC operation
- response (::Google::Protobuf::Empty)
- operation (::GRPC::ActiveCall::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/data_labeling/v1beta1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::DataLabeling::V1beta1::DataLabelingService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::DataLabeling::V1beta1::DeleteDatasetRequest.new # Call the delete_dataset method. result = client.delete_dataset request # The returned object is of type Google::Protobuf::Empty. p result
#delete_evaluation_job
def delete_evaluation_job(request, options = nil) -> ::Google::Protobuf::Empty
def delete_evaluation_job(name: nil) -> ::Google::Protobuf::Empty
Stops and deletes an evaluation job.
def delete_evaluation_job(request, options = nil) -> ::Google::Protobuf::Empty
delete_evaluation_job
via a request object, either of type
Google::Cloud::DataLabeling::V1beta1::DeleteEvaluationJobRequest or an equivalent Hash.
- request (::Google::Cloud::DataLabeling::V1beta1::DeleteEvaluationJobRequest, ::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_evaluation_job(name: nil) -> ::Google::Protobuf::Empty
delete_evaluation_job
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. Name of the evaluation job that is going to be deleted. Format:
"projects/{project_id}/evaluationJobs/{evaluation_job_id}"
- (response, operation) — Access the result along with the RPC operation
- response (::Google::Protobuf::Empty)
- operation (::GRPC::ActiveCall::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/data_labeling/v1beta1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::DataLabeling::V1beta1::DataLabelingService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::DataLabeling::V1beta1::DeleteEvaluationJobRequest.new # Call the delete_evaluation_job method. result = client.delete_evaluation_job request # The returned object is of type Google::Protobuf::Empty. p result
#delete_instruction
def delete_instruction(request, options = nil) -> ::Google::Protobuf::Empty
def delete_instruction(name: nil) -> ::Google::Protobuf::Empty
Deletes an instruction object by resource name.
def delete_instruction(request, options = nil) -> ::Google::Protobuf::Empty
delete_instruction
via a request object, either of type
Google::Cloud::DataLabeling::V1beta1::DeleteInstructionRequest or an equivalent Hash.
- request (::Google::Cloud::DataLabeling::V1beta1::DeleteInstructionRequest, ::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_instruction(name: nil) -> ::Google::Protobuf::Empty
delete_instruction
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. Instruction resource name, format: projects/{project_id}/instructions/{instruction_id}
- (response, operation) — Access the result along with the RPC operation
- response (::Google::Protobuf::Empty)
- operation (::GRPC::ActiveCall::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/data_labeling/v1beta1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::DataLabeling::V1beta1::DataLabelingService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::DataLabeling::V1beta1::DeleteInstructionRequest.new # Call the delete_instruction method. result = client.delete_instruction request # The returned object is of type Google::Protobuf::Empty. p result
#export_data
def export_data(request, options = nil) -> ::Gapic::Operation
def export_data(name: nil, annotated_dataset: nil, filter: nil, output_config: nil, user_email_address: nil) -> ::Gapic::Operation
Exports data and annotations from dataset.
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::DataLabeling::V1beta1::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, annotated_dataset: nil, filter: nil, output_config: nil, user_email_address: 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. Dataset resource name, format: projects/{project_id}/datasets/{dataset_id}
- annotated_dataset (::String) — Required. Annotated dataset resource name. DataItem in Dataset and their annotations in specified annotated dataset will be exported. It's in format of projects/{project_id}/datasets/{dataset_id}/annotatedDatasets/ {annotated_dataset_id}
- filter (::String) — Optional. Filter is not supported at this moment.
- output_config (::Google::Cloud::DataLabeling::V1beta1::OutputConfig, ::Hash) — Required. Specify the output destination.
- user_email_address (::String) — Email of the user who started the export task and should be notified by email. If empty no notification will be sent.
- (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/data_labeling/v1beta1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::DataLabeling::V1beta1::DataLabelingService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::DataLabeling::V1beta1::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
#get_annotated_dataset
def get_annotated_dataset(request, options = nil) -> ::Google::Cloud::DataLabeling::V1beta1::AnnotatedDataset
def get_annotated_dataset(name: nil) -> ::Google::Cloud::DataLabeling::V1beta1::AnnotatedDataset
Gets an annotated dataset by resource name.
def get_annotated_dataset(request, options = nil) -> ::Google::Cloud::DataLabeling::V1beta1::AnnotatedDataset
get_annotated_dataset
via a request object, either of type
GetAnnotatedDatasetRequest or an equivalent Hash.
- request (::Google::Cloud::DataLabeling::V1beta1::GetAnnotatedDatasetRequest, ::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_annotated_dataset(name: nil) -> ::Google::Cloud::DataLabeling::V1beta1::AnnotatedDataset
get_annotated_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. Name of the annotated dataset to get, format: projects/{project_id}/datasets/{dataset_id}/annotatedDatasets/ {annotated_dataset_id}
- (response, operation) — Access the result along with the RPC operation
- response (::Google::Cloud::DataLabeling::V1beta1::AnnotatedDataset)
- operation (::GRPC::ActiveCall::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/data_labeling/v1beta1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::DataLabeling::V1beta1::DataLabelingService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::DataLabeling::V1beta1::GetAnnotatedDatasetRequest.new # Call the get_annotated_dataset method. result = client.get_annotated_dataset request # The returned object is of type Google::Cloud::DataLabeling::V1beta1::AnnotatedDataset. p result
#get_annotation_spec_set
def get_annotation_spec_set(request, options = nil) -> ::Google::Cloud::DataLabeling::V1beta1::AnnotationSpecSet
def get_annotation_spec_set(name: nil) -> ::Google::Cloud::DataLabeling::V1beta1::AnnotationSpecSet
Gets an annotation spec set by resource name.
def get_annotation_spec_set(request, options = nil) -> ::Google::Cloud::DataLabeling::V1beta1::AnnotationSpecSet
get_annotation_spec_set
via a request object, either of type
GetAnnotationSpecSetRequest or an equivalent Hash.
- request (::Google::Cloud::DataLabeling::V1beta1::GetAnnotationSpecSetRequest, ::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_set(name: nil) -> ::Google::Cloud::DataLabeling::V1beta1::AnnotationSpecSet
get_annotation_spec_set
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. AnnotationSpecSet resource name, format: projects/{project_id}/annotationSpecSets/{annotation_spec_set_id}
- (response, operation) — Access the result along with the RPC operation
- response (::Google::Cloud::DataLabeling::V1beta1::AnnotationSpecSet)
- operation (::GRPC::ActiveCall::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/data_labeling/v1beta1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::DataLabeling::V1beta1::DataLabelingService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::DataLabeling::V1beta1::GetAnnotationSpecSetRequest.new # Call the get_annotation_spec_set method. result = client.get_annotation_spec_set request # The returned object is of type Google::Cloud::DataLabeling::V1beta1::AnnotationSpecSet. p result
#get_data_item
def get_data_item(request, options = nil) -> ::Google::Cloud::DataLabeling::V1beta1::DataItem
def get_data_item(name: nil) -> ::Google::Cloud::DataLabeling::V1beta1::DataItem
Gets a data item in a dataset by resource name. This API can be called after data are imported into dataset.
def get_data_item(request, options = nil) -> ::Google::Cloud::DataLabeling::V1beta1::DataItem
get_data_item
via a request object, either of type
GetDataItemRequest or an equivalent Hash.
- request (::Google::Cloud::DataLabeling::V1beta1::GetDataItemRequest, ::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_data_item(name: nil) -> ::Google::Cloud::DataLabeling::V1beta1::DataItem
get_data_item
via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
- name (::String) — Required. The name of the data item to get, format: projects/{project_id}/datasets/{dataset_id}/dataItems/{data_item_id}
- (response, operation) — Access the result along with the RPC operation
- response (::Google::Cloud::DataLabeling::V1beta1::DataItem)
- operation (::GRPC::ActiveCall::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/data_labeling/v1beta1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::DataLabeling::V1beta1::DataLabelingService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::DataLabeling::V1beta1::GetDataItemRequest.new # Call the get_data_item method. result = client.get_data_item request # The returned object is of type Google::Cloud::DataLabeling::V1beta1::DataItem. p result
#get_dataset
def get_dataset(request, options = nil) -> ::Google::Cloud::DataLabeling::V1beta1::Dataset
def get_dataset(name: nil) -> ::Google::Cloud::DataLabeling::V1beta1::Dataset
Gets dataset by resource name.
def get_dataset(request, options = nil) -> ::Google::Cloud::DataLabeling::V1beta1::Dataset
get_dataset
via a request object, either of type
GetDatasetRequest or an equivalent Hash.
- request (::Google::Cloud::DataLabeling::V1beta1::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::DataLabeling::V1beta1::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. Dataset resource name, format: projects/{project_id}/datasets/{dataset_id}
- (response, operation) — Access the result along with the RPC operation
- response (::Google::Cloud::DataLabeling::V1beta1::Dataset)
- operation (::GRPC::ActiveCall::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/data_labeling/v1beta1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::DataLabeling::V1beta1::DataLabelingService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::DataLabeling::V1beta1::GetDatasetRequest.new # Call the get_dataset method. result = client.get_dataset request # The returned object is of type Google::Cloud::DataLabeling::V1beta1::Dataset. p result
#get_evaluation
def get_evaluation(request, options = nil) -> ::Google::Cloud::DataLabeling::V1beta1::Evaluation
def get_evaluation(name: nil) -> ::Google::Cloud::DataLabeling::V1beta1::Evaluation
Gets an evaluation by resource name (to search, use projects.evaluations.search).
def get_evaluation(request, options = nil) -> ::Google::Cloud::DataLabeling::V1beta1::Evaluation
get_evaluation
via a request object, either of type
GetEvaluationRequest or an equivalent Hash.
- request (::Google::Cloud::DataLabeling::V1beta1::GetEvaluationRequest, ::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_evaluation(name: nil) -> ::Google::Cloud::DataLabeling::V1beta1::Evaluation
get_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. Name of the evaluation. Format:
"projects/{project_id}/datasets/{dataset_id}/evaluations/{evaluation_id}'
- (response, operation) — Access the result along with the RPC operation
- response (::Google::Cloud::DataLabeling::V1beta1::Evaluation)
- operation (::GRPC::ActiveCall::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/data_labeling/v1beta1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::DataLabeling::V1beta1::DataLabelingService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::DataLabeling::V1beta1::GetEvaluationRequest.new # Call the get_evaluation method. result = client.get_evaluation request # The returned object is of type Google::Cloud::DataLabeling::V1beta1::Evaluation. p result
#get_evaluation_job
def get_evaluation_job(request, options = nil) -> ::Google::Cloud::DataLabeling::V1beta1::EvaluationJob
def get_evaluation_job(name: nil) -> ::Google::Cloud::DataLabeling::V1beta1::EvaluationJob
Gets an evaluation job by resource name.
def get_evaluation_job(request, options = nil) -> ::Google::Cloud::DataLabeling::V1beta1::EvaluationJob
get_evaluation_job
via a request object, either of type
GetEvaluationJobRequest or an equivalent Hash.
- request (::Google::Cloud::DataLabeling::V1beta1::GetEvaluationJobRequest, ::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_evaluation_job(name: nil) -> ::Google::Cloud::DataLabeling::V1beta1::EvaluationJob
get_evaluation_job
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. Name of the evaluation job. Format:
"projects/{project_id}/evaluationJobs/{evaluation_job_id}"
- (response, operation) — Access the result along with the RPC operation
- response (::Google::Cloud::DataLabeling::V1beta1::EvaluationJob)
- operation (::GRPC::ActiveCall::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/data_labeling/v1beta1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::DataLabeling::V1beta1::DataLabelingService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::DataLabeling::V1beta1::GetEvaluationJobRequest.new # Call the get_evaluation_job method. result = client.get_evaluation_job request # The returned object is of type Google::Cloud::DataLabeling::V1beta1::EvaluationJob. p result
#get_example
def get_example(request, options = nil) -> ::Google::Cloud::DataLabeling::V1beta1::Example
def get_example(name: nil, filter: nil) -> ::Google::Cloud::DataLabeling::V1beta1::Example
Gets an example by resource name, including both data and annotation.
def get_example(request, options = nil) -> ::Google::Cloud::DataLabeling::V1beta1::Example
get_example
via a request object, either of type
GetExampleRequest or an equivalent Hash.
- request (::Google::Cloud::DataLabeling::V1beta1::GetExampleRequest, ::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_example(name: nil, filter: nil) -> ::Google::Cloud::DataLabeling::V1beta1::Example
get_example
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. Name of example, format: projects/{project_id}/datasets/{dataset_id}/annotatedDatasets/ {annotated_dataset_id}/examples/{example_id}
- filter (::String) — Optional. An expression for filtering Examples. Filter by annotation_spec.display_name is supported. Format "annotation_spec.display_name = {display_name}"
- (response, operation) — Access the result along with the RPC operation
- response (::Google::Cloud::DataLabeling::V1beta1::Example)
- operation (::GRPC::ActiveCall::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/data_labeling/v1beta1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::DataLabeling::V1beta1::DataLabelingService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::DataLabeling::V1beta1::GetExampleRequest.new # Call the get_example method. result = client.get_example request # The returned object is of type Google::Cloud::DataLabeling::V1beta1::Example. p result
#get_instruction
def get_instruction(request, options = nil) -> ::Google::Cloud::DataLabeling::V1beta1::Instruction
def get_instruction(name: nil) -> ::Google::Cloud::DataLabeling::V1beta1::Instruction
Gets an instruction by resource name.
def get_instruction(request, options = nil) -> ::Google::Cloud::DataLabeling::V1beta1::Instruction
get_instruction
via a request object, either of type
GetInstructionRequest or an equivalent Hash.
- request (::Google::Cloud::DataLabeling::V1beta1::GetInstructionRequest, ::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_instruction(name: nil) -> ::Google::Cloud::DataLabeling::V1beta1::Instruction
get_instruction
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. Instruction resource name, format: projects/{project_id}/instructions/{instruction_id}
- (response, operation) — Access the result along with the RPC operation
- response (::Google::Cloud::DataLabeling::V1beta1::Instruction)
- operation (::GRPC::ActiveCall::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/data_labeling/v1beta1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::DataLabeling::V1beta1::DataLabelingService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::DataLabeling::V1beta1::GetInstructionRequest.new # Call the get_instruction method. result = client.get_instruction request # The returned object is of type Google::Cloud::DataLabeling::V1beta1::Instruction. p result
#import_data
def import_data(request, options = nil) -> ::Gapic::Operation
def import_data(name: nil, input_config: nil, user_email_address: nil) -> ::Gapic::Operation
Imports data into dataset based on source locations defined in request. It can be called multiple times for the same dataset. Each dataset can only have one long running operation running on it. For example, no labeling task (also long running operation) can be started while importing is still ongoing. Vice versa.
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::DataLabeling::V1beta1::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, user_email_address: 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 resource name, format: projects/{project_id}/datasets/{dataset_id}
- input_config (::Google::Cloud::DataLabeling::V1beta1::InputConfig, ::Hash) — Required. Specify the input source of the data.
- user_email_address (::String) — Email of the user who started the import task and should be notified by email. If empty no notification will be sent.
- (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/data_labeling/v1beta1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::DataLabeling::V1beta1::DataLabelingService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::DataLabeling::V1beta1::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 DataLabelingService client object.
- (config) — Configure the DataLabelingService client.
- config (Client::Configuration)
- (Client) — a new instance of Client
# Create a client using the default configuration client = ::Google::Cloud::DataLabeling::V1beta1::DataLabelingService::Client.new # Create a client using a custom configuration client = ::Google::Cloud::DataLabeling::V1beta1::DataLabelingService::Client.new do |config| config.timeout = 10.0 end
#label_image
def label_image(request, options = nil) -> ::Gapic::Operation
def label_image(image_classification_config: nil, bounding_poly_config: nil, polyline_config: nil, segmentation_config: nil, parent: nil, basic_config: nil, feature: nil) -> ::Gapic::Operation
Starts a labeling task for image. The type of image labeling task is configured by feature in the request.
def label_image(request, options = nil) -> ::Gapic::Operation
label_image
via a request object, either of type
LabelImageRequest or an equivalent Hash.
- request (::Google::Cloud::DataLabeling::V1beta1::LabelImageRequest, ::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 label_image(image_classification_config: nil, bounding_poly_config: nil, polyline_config: nil, segmentation_config: nil, parent: nil, basic_config: nil, feature: nil) -> ::Gapic::Operation
label_image
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_classification_config (::Google::Cloud::DataLabeling::V1beta1::ImageClassificationConfig, ::Hash) — Configuration for image classification task. One of image_classification_config, bounding_poly_config, polyline_config and segmentation_config are required.
- bounding_poly_config (::Google::Cloud::DataLabeling::V1beta1::BoundingPolyConfig, ::Hash) — Configuration for bounding box and bounding poly task. One of image_classification_config, bounding_poly_config, polyline_config and segmentation_config are required.
- polyline_config (::Google::Cloud::DataLabeling::V1beta1::PolylineConfig, ::Hash) — Configuration for polyline task. One of image_classification_config, bounding_poly_config, polyline_config and segmentation_config are required.
- segmentation_config (::Google::Cloud::DataLabeling::V1beta1::SegmentationConfig, ::Hash) — Configuration for segmentation task. One of image_classification_config, bounding_poly_config, polyline_config and segmentation_config are required.
- parent (::String) — Required. Name of the dataset to request labeling task, format: projects/{project_id}/datasets/{dataset_id}
- basic_config (::Google::Cloud::DataLabeling::V1beta1::HumanAnnotationConfig, ::Hash) — Required. Basic human annotation config.
- feature (::Google::Cloud::DataLabeling::V1beta1::LabelImageRequest::Feature) — Required. The type of image labeling task.
- (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/data_labeling/v1beta1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::DataLabeling::V1beta1::DataLabelingService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::DataLabeling::V1beta1::LabelImageRequest.new # Call the label_image method. result = client.label_image 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
#label_text
def label_text(request, options = nil) -> ::Gapic::Operation
def label_text(text_classification_config: nil, text_entity_extraction_config: nil, parent: nil, basic_config: nil, feature: nil) -> ::Gapic::Operation
Starts a labeling task for text. The type of text labeling task is configured by feature in the request.
def label_text(request, options = nil) -> ::Gapic::Operation
label_text
via a request object, either of type
LabelTextRequest or an equivalent Hash.
- request (::Google::Cloud::DataLabeling::V1beta1::LabelTextRequest, ::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 label_text(text_classification_config: nil, text_entity_extraction_config: nil, parent: nil, basic_config: nil, feature: nil) -> ::Gapic::Operation
label_text
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).
- text_classification_config (::Google::Cloud::DataLabeling::V1beta1::TextClassificationConfig, ::Hash) — Configuration for text classification task. One of text_classification_config and text_entity_extraction_config is required.
- text_entity_extraction_config (::Google::Cloud::DataLabeling::V1beta1::TextEntityExtractionConfig, ::Hash) — Configuration for entity extraction task. One of text_classification_config and text_entity_extraction_config is required.
- parent (::String) — Required. Name of the data set to request labeling task, format: projects/{project_id}/datasets/{dataset_id}
- basic_config (::Google::Cloud::DataLabeling::V1beta1::HumanAnnotationConfig, ::Hash) — Required. Basic human annotation config.
- feature (::Google::Cloud::DataLabeling::V1beta1::LabelTextRequest::Feature) — Required. The type of text labeling task.
- (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/data_labeling/v1beta1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::DataLabeling::V1beta1::DataLabelingService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::DataLabeling::V1beta1::LabelTextRequest.new # Call the label_text method. result = client.label_text 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
#label_video
def label_video(request, options = nil) -> ::Gapic::Operation
def label_video(video_classification_config: nil, object_detection_config: nil, object_tracking_config: nil, event_config: nil, parent: nil, basic_config: nil, feature: nil) -> ::Gapic::Operation
Starts a labeling task for video. The type of video labeling task is configured by feature in the request.
def label_video(request, options = nil) -> ::Gapic::Operation
label_video
via a request object, either of type
LabelVideoRequest or an equivalent Hash.
- request (::Google::Cloud::DataLabeling::V1beta1::LabelVideoRequest, ::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 label_video(video_classification_config: nil, object_detection_config: nil, object_tracking_config: nil, event_config: nil, parent: nil, basic_config: nil, feature: nil) -> ::Gapic::Operation
label_video
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).
- video_classification_config (::Google::Cloud::DataLabeling::V1beta1::VideoClassificationConfig, ::Hash) — Configuration for video classification task. One of video_classification_config, object_detection_config, object_tracking_config and event_config is required.
- object_detection_config (::Google::Cloud::DataLabeling::V1beta1::ObjectDetectionConfig, ::Hash) — Configuration for video object detection task. One of video_classification_config, object_detection_config, object_tracking_config and event_config is required.
- object_tracking_config (::Google::Cloud::DataLabeling::V1beta1::ObjectTrackingConfig, ::Hash) — Configuration for video object tracking task. One of video_classification_config, object_detection_config, object_tracking_config and event_config is required.
- event_config (::Google::Cloud::DataLabeling::V1beta1::EventConfig, ::Hash) — Configuration for video event task. One of video_classification_config, object_detection_config, object_tracking_config and event_config is required.
- parent (::String) — Required. Name of the dataset to request labeling task, format: projects/{project_id}/datasets/{dataset_id}
- basic_config (::Google::Cloud::DataLabeling::V1beta1::HumanAnnotationConfig, ::Hash) — Required. Basic human annotation config.
- feature (::Google::Cloud::DataLabeling::V1beta1::LabelVideoRequest::Feature) — Required. The type of video labeling task.
- (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/data_labeling/v1beta1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::DataLabeling::V1beta1::DataLabelingService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::DataLabeling::V1beta1::LabelVideoRequest.new # Call the label_video method. result = client.label_video 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
#list_annotated_datasets
def list_annotated_datasets(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::DataLabeling::V1beta1::AnnotatedDataset>
def list_annotated_datasets(parent: nil, filter: nil, page_size: nil, page_token: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::DataLabeling::V1beta1::AnnotatedDataset>
Lists annotated datasets for a dataset. Pagination is supported.
def list_annotated_datasets(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::DataLabeling::V1beta1::AnnotatedDataset>
list_annotated_datasets
via a request object, either of type
ListAnnotatedDatasetsRequest or an equivalent Hash.
- request (::Google::Cloud::DataLabeling::V1beta1::ListAnnotatedDatasetsRequest, ::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_annotated_datasets(parent: nil, filter: nil, page_size: nil, page_token: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::DataLabeling::V1beta1::AnnotatedDataset>
list_annotated_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. Name of the dataset to list annotated datasets, format: projects/{project_id}/datasets/{dataset_id}
- filter (::String) — Optional. Filter is not supported at this moment.
- page_size (::Integer) — Optional. Requested page size. Server may return fewer results than requested. Default value is 100.
- page_token (::String) — Optional. A token identifying a page of results for the server to return. Typically obtained by ListAnnotatedDatasetsResponse.next_page_token of the previous [DataLabelingService.ListAnnotatedDatasets] call. Return first page if empty.
- (response, operation) — Access the result along with the RPC operation
- response (::Gapic::PagedEnumerable<::Google::Cloud::DataLabeling::V1beta1::AnnotatedDataset>)
- operation (::GRPC::ActiveCall::Operation)
- (::Gapic::PagedEnumerable<::Google::Cloud::DataLabeling::V1beta1::AnnotatedDataset>)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/data_labeling/v1beta1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::DataLabeling::V1beta1::DataLabelingService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::DataLabeling::V1beta1::ListAnnotatedDatasetsRequest.new # Call the list_annotated_datasets method. result = client.list_annotated_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::DataLabeling::V1beta1::AnnotatedDataset. p item end
#list_annotation_spec_sets
def list_annotation_spec_sets(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::DataLabeling::V1beta1::AnnotationSpecSet>
def list_annotation_spec_sets(parent: nil, filter: nil, page_size: nil, page_token: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::DataLabeling::V1beta1::AnnotationSpecSet>
Lists annotation spec sets for a project. Pagination is supported.
def list_annotation_spec_sets(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::DataLabeling::V1beta1::AnnotationSpecSet>
list_annotation_spec_sets
via a request object, either of type
ListAnnotationSpecSetsRequest or an equivalent Hash.
- request (::Google::Cloud::DataLabeling::V1beta1::ListAnnotationSpecSetsRequest, ::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_annotation_spec_sets(parent: nil, filter: nil, page_size: nil, page_token: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::DataLabeling::V1beta1::AnnotationSpecSet>
list_annotation_spec_sets
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. Parent of AnnotationSpecSet resource, format: projects/{project_id}
- filter (::String) — Optional. Filter is not supported at this moment.
- page_size (::Integer) — Optional. Requested page size. Server may return fewer results than requested. Default value is 100.
- page_token (::String) — Optional. A token identifying a page of results for the server to return. Typically obtained by ListAnnotationSpecSetsResponse.next_page_token of the previous [DataLabelingService.ListAnnotationSpecSets] call. Return first page if empty.
- (response, operation) — Access the result along with the RPC operation
- response (::Gapic::PagedEnumerable<::Google::Cloud::DataLabeling::V1beta1::AnnotationSpecSet>)
- operation (::GRPC::ActiveCall::Operation)
- (::Gapic::PagedEnumerable<::Google::Cloud::DataLabeling::V1beta1::AnnotationSpecSet>)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/data_labeling/v1beta1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::DataLabeling::V1beta1::DataLabelingService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::DataLabeling::V1beta1::ListAnnotationSpecSetsRequest.new # Call the list_annotation_spec_sets method. result = client.list_annotation_spec_sets 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::DataLabeling::V1beta1::AnnotationSpecSet. p item end
#list_data_items
def list_data_items(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::DataLabeling::V1beta1::DataItem>
def list_data_items(parent: nil, filter: nil, page_size: nil, page_token: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::DataLabeling::V1beta1::DataItem>
Lists data items in a dataset. This API can be called after data are imported into dataset. Pagination is supported.
def list_data_items(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::DataLabeling::V1beta1::DataItem>
list_data_items
via a request object, either of type
ListDataItemsRequest or an equivalent Hash.
- request (::Google::Cloud::DataLabeling::V1beta1::ListDataItemsRequest, ::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_data_items(parent: nil, filter: nil, page_size: nil, page_token: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::DataLabeling::V1beta1::DataItem>
list_data_items
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. Name of the dataset to list data items, format: projects/{project_id}/datasets/{dataset_id}
- filter (::String) — Optional. Filter is not supported at this moment.
- page_size (::Integer) — Optional. Requested page size. Server may return fewer results than requested. Default value is 100.
- page_token (::String) — Optional. A token identifying a page of results for the server to return. Typically obtained by ListDataItemsResponse.next_page_token of the previous [DataLabelingService.ListDataItems] call. Return first page if empty.
- (response, operation) — Access the result along with the RPC operation
- response (::Gapic::PagedEnumerable<::Google::Cloud::DataLabeling::V1beta1::DataItem>)
- operation (::GRPC::ActiveCall::Operation)
- (::Gapic::PagedEnumerable<::Google::Cloud::DataLabeling::V1beta1::DataItem>)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/data_labeling/v1beta1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::DataLabeling::V1beta1::DataLabelingService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::DataLabeling::V1beta1::ListDataItemsRequest.new # Call the list_data_items method. result = client.list_data_items 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::DataLabeling::V1beta1::DataItem. p item end
#list_datasets
def list_datasets(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::DataLabeling::V1beta1::Dataset>
def list_datasets(parent: nil, filter: nil, page_size: nil, page_token: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::DataLabeling::V1beta1::Dataset>
Lists datasets under a project. Pagination is supported.
def list_datasets(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::DataLabeling::V1beta1::Dataset>
list_datasets
via a request object, either of type
ListDatasetsRequest or an equivalent Hash.
- request (::Google::Cloud::DataLabeling::V1beta1::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::DataLabeling::V1beta1::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. Dataset resource parent, format: projects/{project_id}
- filter (::String) — Optional. Filter on dataset is not supported at this moment.
- page_size (::Integer) — Optional. Requested page size. Server may return fewer results than requested. Default value is 100.
- page_token (::String) — Optional. A token identifying a page of results for the server to return. Typically obtained by ListDatasetsResponse.next_page_token of the previous [DataLabelingService.ListDatasets] call. Returns the first page if empty.
- (response, operation) — Access the result along with the RPC operation
- response (::Gapic::PagedEnumerable<::Google::Cloud::DataLabeling::V1beta1::Dataset>)
- operation (::GRPC::ActiveCall::Operation)
- (::Gapic::PagedEnumerable<::Google::Cloud::DataLabeling::V1beta1::Dataset>)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/data_labeling/v1beta1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::DataLabeling::V1beta1::DataLabelingService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::DataLabeling::V1beta1::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::DataLabeling::V1beta1::Dataset. p item end
#list_evaluation_jobs
def list_evaluation_jobs(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::DataLabeling::V1beta1::EvaluationJob>
def list_evaluation_jobs(parent: nil, filter: nil, page_size: nil, page_token: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::DataLabeling::V1beta1::EvaluationJob>
Lists all evaluation jobs within a project with possible filters. Pagination is supported.
def list_evaluation_jobs(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::DataLabeling::V1beta1::EvaluationJob>
list_evaluation_jobs
via a request object, either of type
ListEvaluationJobsRequest or an equivalent Hash.
- request (::Google::Cloud::DataLabeling::V1beta1::ListEvaluationJobsRequest, ::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_evaluation_jobs(parent: nil, filter: nil, page_size: nil, page_token: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::DataLabeling::V1beta1::EvaluationJob>
list_evaluation_jobs
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. Evaluation job resource parent. Format: "projects/{project_id}"
-
filter (::String) — Optional. You can filter the jobs to list by model_id (also known as
model_name, as described in
EvaluationJob.modelVersion) or by
evaluation job state (as described in EvaluationJob.state). To filter
by both criteria, use the
AND
operator or theOR
operator. For example, you can use the following string for your filter: "evaluationjob.model_id = {model_name} AND evaluationjob.state = {evaluation_job_state}" - page_size (::Integer) — Optional. Requested page size. Server may return fewer results than requested. Default value is 100.
- page_token (::String) — Optional. A token identifying a page of results for the server to return. Typically obtained by the nextPageToken in the response to the previous request. The request returns the first page if this is empty.
- (response, operation) — Access the result along with the RPC operation
- response (::Gapic::PagedEnumerable<::Google::Cloud::DataLabeling::V1beta1::EvaluationJob>)
- operation (::GRPC::ActiveCall::Operation)
- (::Gapic::PagedEnumerable<::Google::Cloud::DataLabeling::V1beta1::EvaluationJob>)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/data_labeling/v1beta1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::DataLabeling::V1beta1::DataLabelingService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::DataLabeling::V1beta1::ListEvaluationJobsRequest.new # Call the list_evaluation_jobs method. result = client.list_evaluation_jobs 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::DataLabeling::V1beta1::EvaluationJob. p item end
#list_examples
def list_examples(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::DataLabeling::V1beta1::Example>
def list_examples(parent: nil, filter: nil, page_size: nil, page_token: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::DataLabeling::V1beta1::Example>
Lists examples in an annotated dataset. Pagination is supported.
def list_examples(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::DataLabeling::V1beta1::Example>
list_examples
via a request object, either of type
ListExamplesRequest or an equivalent Hash.
- request (::Google::Cloud::DataLabeling::V1beta1::ListExamplesRequest, ::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_examples(parent: nil, filter: nil, page_size: nil, page_token: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::DataLabeling::V1beta1::Example>
list_examples
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. Example resource parent.
- filter (::String) — Optional. An expression for filtering Examples. For annotated datasets that have annotation spec set, filter by annotation_spec.display_name is supported. Format "annotation_spec.display_name = {display_name}"
- page_size (::Integer) — Optional. Requested page size. Server may return fewer results than requested. Default value is 100.
- page_token (::String) — Optional. A token identifying a page of results for the server to return. Typically obtained by ListExamplesResponse.next_page_token of the previous [DataLabelingService.ListExamples] call. Return first page if empty.
- (response, operation) — Access the result along with the RPC operation
- response (::Gapic::PagedEnumerable<::Google::Cloud::DataLabeling::V1beta1::Example>)
- operation (::GRPC::ActiveCall::Operation)
- (::Gapic::PagedEnumerable<::Google::Cloud::DataLabeling::V1beta1::Example>)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/data_labeling/v1beta1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::DataLabeling::V1beta1::DataLabelingService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::DataLabeling::V1beta1::ListExamplesRequest.new # Call the list_examples method. result = client.list_examples 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::DataLabeling::V1beta1::Example. p item end
#list_instructions
def list_instructions(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::DataLabeling::V1beta1::Instruction>
def list_instructions(parent: nil, filter: nil, page_size: nil, page_token: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::DataLabeling::V1beta1::Instruction>
Lists instructions for a project. Pagination is supported.
def list_instructions(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::DataLabeling::V1beta1::Instruction>
list_instructions
via a request object, either of type
ListInstructionsRequest or an equivalent Hash.
- request (::Google::Cloud::DataLabeling::V1beta1::ListInstructionsRequest, ::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_instructions(parent: nil, filter: nil, page_size: nil, page_token: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::DataLabeling::V1beta1::Instruction>
list_instructions
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. Instruction resource parent, format: projects/{project_id}
- filter (::String) — Optional. Filter is not supported at this moment.
- page_size (::Integer) — Optional. Requested page size. Server may return fewer results than requested. Default value is 100.
- page_token (::String) — Optional. A token identifying a page of results for the server to return. Typically obtained by ListInstructionsResponse.next_page_token of the previous [DataLabelingService.ListInstructions] call. Return first page if empty.
- (response, operation) — Access the result along with the RPC operation
- response (::Gapic::PagedEnumerable<::Google::Cloud::DataLabeling::V1beta1::Instruction>)
- operation (::GRPC::ActiveCall::Operation)
- (::Gapic::PagedEnumerable<::Google::Cloud::DataLabeling::V1beta1::Instruction>)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/data_labeling/v1beta1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::DataLabeling::V1beta1::DataLabelingService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::DataLabeling::V1beta1::ListInstructionsRequest.new # Call the list_instructions method. result = client.list_instructions 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::DataLabeling::V1beta1::Instruction. p item end
#logger
def logger() -> Logger
The logger used for request/response debug logging.
- (Logger)
#operations_client
def operations_client() -> ::Google::Cloud::DataLabeling::V1beta1::DataLabelingService::Operations
Get the associated client for long-running operations.
#pause_evaluation_job
def pause_evaluation_job(request, options = nil) -> ::Google::Protobuf::Empty
def pause_evaluation_job(name: nil) -> ::Google::Protobuf::Empty
Pauses an evaluation job. Pausing an evaluation job that is already in a
PAUSED
state is a no-op.
def pause_evaluation_job(request, options = nil) -> ::Google::Protobuf::Empty
pause_evaluation_job
via a request object, either of type
PauseEvaluationJobRequest or an equivalent Hash.
- request (::Google::Cloud::DataLabeling::V1beta1::PauseEvaluationJobRequest, ::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 pause_evaluation_job(name: nil) -> ::Google::Protobuf::Empty
pause_evaluation_job
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. Name of the evaluation job that is going to be paused. Format:
"projects/{project_id}/evaluationJobs/{evaluation_job_id}"
- (response, operation) — Access the result along with the RPC operation
- response (::Google::Protobuf::Empty)
- operation (::GRPC::ActiveCall::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/data_labeling/v1beta1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::DataLabeling::V1beta1::DataLabelingService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::DataLabeling::V1beta1::PauseEvaluationJobRequest.new # Call the pause_evaluation_job method. result = client.pause_evaluation_job request # The returned object is of type Google::Protobuf::Empty. p result
#resume_evaluation_job
def resume_evaluation_job(request, options = nil) -> ::Google::Protobuf::Empty
def resume_evaluation_job(name: nil) -> ::Google::Protobuf::Empty
Resumes a paused evaluation job. A deleted evaluation job can't be resumed. Resuming a running or scheduled evaluation job is a no-op.
def resume_evaluation_job(request, options = nil) -> ::Google::Protobuf::Empty
resume_evaluation_job
via a request object, either of type
ResumeEvaluationJobRequest or an equivalent Hash.
- request (::Google::Cloud::DataLabeling::V1beta1::ResumeEvaluationJobRequest, ::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 resume_evaluation_job(name: nil) -> ::Google::Protobuf::Empty
resume_evaluation_job
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. Name of the evaluation job that is going to be resumed. Format:
"projects/{project_id}/evaluationJobs/{evaluation_job_id}"
- (response, operation) — Access the result along with the RPC operation
- response (::Google::Protobuf::Empty)
- operation (::GRPC::ActiveCall::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/data_labeling/v1beta1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::DataLabeling::V1beta1::DataLabelingService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::DataLabeling::V1beta1::ResumeEvaluationJobRequest.new # Call the resume_evaluation_job method. result = client.resume_evaluation_job request # The returned object is of type Google::Protobuf::Empty. p result
#search_evaluations
def search_evaluations(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::DataLabeling::V1beta1::Evaluation>
def search_evaluations(parent: nil, filter: nil, page_size: nil, page_token: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::DataLabeling::V1beta1::Evaluation>
Searches evaluations within a project.
def search_evaluations(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::DataLabeling::V1beta1::Evaluation>
search_evaluations
via a request object, either of type
SearchEvaluationsRequest or an equivalent Hash.
- request (::Google::Cloud::DataLabeling::V1beta1::SearchEvaluationsRequest, ::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 search_evaluations(parent: nil, filter: nil, page_size: nil, page_token: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::DataLabeling::V1beta1::Evaluation>
search_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. Evaluation search parent (project ID). Format: "projects/{project_id}"
-
filter (::String) — Optional. To search evaluations, you can filter by the following:
- evaluation_job.evaluation_job_id (the last part of EvaluationJob.name)
- evaluation_job.model_id (the {model_name} portion of EvaluationJob.modelVersion)
- evaluation_job.evaluation_job_run_time_start (Minimum threshold for the evaluationJobRunTime that created the evaluation)
- evaluation_job.evaluation_job_run_time_end (Maximum threshold for the evaluationJobRunTime that created the evaluation)
- evaluation_job.job_state (EvaluationJob.state)
- annotation_spec.display_name (the Evaluation contains a metric for the annotation spec with this displayName)
To filter by multiple critiera, use the
AND
operator or theOR
operator. The following examples shows a string that filters by several critiera:"evaluationjob.evaluation_job_id = {evaluation_job_id} AND evaluationjob.model_id = {model_name} AND evaluationjob.evaluation_job_run_time_start = {timestamp_1} AND evaluationjob.evaluation_job_run_time_end = {timestamp_2} AND annotation_spec.display_name = {display_name}"
- page_size (::Integer) — Optional. Requested page size. Server may return fewer results than requested. Default value is 100.
-
page_token (::String) — Optional. A token identifying a page of results for the server to return.
Typically obtained by the
nextPageToken of the response
to a previous search request.
If you don't specify this field, the API call requests the first page of the search.
- (response, operation) — Access the result along with the RPC operation
- response (::Gapic::PagedEnumerable<::Google::Cloud::DataLabeling::V1beta1::Evaluation>)
- operation (::GRPC::ActiveCall::Operation)
- (::Gapic::PagedEnumerable<::Google::Cloud::DataLabeling::V1beta1::Evaluation>)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/data_labeling/v1beta1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::DataLabeling::V1beta1::DataLabelingService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::DataLabeling::V1beta1::SearchEvaluationsRequest.new # Call the search_evaluations method. result = client.search_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::DataLabeling::V1beta1::Evaluation. p item end
#search_example_comparisons
def search_example_comparisons(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::DataLabeling::V1beta1::SearchExampleComparisonsResponse::ExampleComparison>
def search_example_comparisons(parent: nil, page_size: nil, page_token: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::DataLabeling::V1beta1::SearchExampleComparisonsResponse::ExampleComparison>
Searches example comparisons from an evaluation. The return format is a list of example comparisons that show ground truth and prediction(s) for a single input. Search by providing an evaluation ID.
def search_example_comparisons(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::DataLabeling::V1beta1::SearchExampleComparisonsResponse::ExampleComparison>
search_example_comparisons
via a request object, either of type
SearchExampleComparisonsRequest or an equivalent Hash.
- request (::Google::Cloud::DataLabeling::V1beta1::SearchExampleComparisonsRequest, ::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 search_example_comparisons(parent: nil, page_size: nil, page_token: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::DataLabeling::V1beta1::SearchExampleComparisonsResponse::ExampleComparison>
search_example_comparisons
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. Name of the Evaluation resource to search for example
comparisons from. Format:
"projects/{project_id}/datasets/{dataset_id}/evaluations/{evaluation_id}"
- page_size (::Integer) — Optional. Requested page size. Server may return fewer results than requested. Default value is 100.
-
page_token (::String) — Optional. A token identifying a page of results for the server to return.
Typically obtained by the
[nextPageToken][SearchExampleComparisons.next_page_token] of the response
to a previous search rquest.
If you don't specify this field, the API call requests the first page of the search.
- (response, operation) — Access the result along with the RPC operation
- response (::Gapic::PagedEnumerable<::Google::Cloud::DataLabeling::V1beta1::SearchExampleComparisonsResponse::ExampleComparison>)
- operation (::GRPC::ActiveCall::Operation)
- (::Gapic::PagedEnumerable<::Google::Cloud::DataLabeling::V1beta1::SearchExampleComparisonsResponse::ExampleComparison>)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/data_labeling/v1beta1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::DataLabeling::V1beta1::DataLabelingService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::DataLabeling::V1beta1::SearchExampleComparisonsRequest.new # Call the search_example_comparisons method. result = client.search_example_comparisons 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::DataLabeling::V1beta1::SearchExampleComparisonsResponse::ExampleComparison. p item end
#universe_domain
def universe_domain() -> String
The effective universe domain
- (String)
#update_evaluation_job
def update_evaluation_job(request, options = nil) -> ::Google::Cloud::DataLabeling::V1beta1::EvaluationJob
def update_evaluation_job(evaluation_job: nil, update_mask: nil) -> ::Google::Cloud::DataLabeling::V1beta1::EvaluationJob
Updates an evaluation job. You can only update certain fields of the job's
EvaluationJobConfig: humanAnnotationConfig.instruction
,
exampleCount
, and exampleSamplePercentage
.
If you want to change any other aspect of the evaluation job, you must delete the job and create a new one.
def update_evaluation_job(request, options = nil) -> ::Google::Cloud::DataLabeling::V1beta1::EvaluationJob
update_evaluation_job
via a request object, either of type
UpdateEvaluationJobRequest or an equivalent Hash.
- request (::Google::Cloud::DataLabeling::V1beta1::UpdateEvaluationJobRequest, ::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_evaluation_job(evaluation_job: nil, update_mask: nil) -> ::Google::Cloud::DataLabeling::V1beta1::EvaluationJob
update_evaluation_job
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).
- evaluation_job (::Google::Cloud::DataLabeling::V1beta1::EvaluationJob, ::Hash) — Required. Evaluation job that is going to be updated.
-
update_mask (::Google::Protobuf::FieldMask, ::Hash) — Optional. Mask for which fields to update. You can only provide the
following fields:
evaluationJobConfig.humanAnnotationConfig.instruction
evaluationJobConfig.exampleCount
evaluationJobConfig.exampleSamplePercentage
You can provide more than one of these fields by separating them with commas.
- (response, operation) — Access the result along with the RPC operation
- response (::Google::Cloud::DataLabeling::V1beta1::EvaluationJob)
- operation (::GRPC::ActiveCall::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/data_labeling/v1beta1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::DataLabeling::V1beta1::DataLabelingService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::DataLabeling::V1beta1::UpdateEvaluationJobRequest.new # Call the update_evaluation_job method. result = client.update_evaluation_job request # The returned object is of type Google::Cloud::DataLabeling::V1beta1::EvaluationJob. p result