DataLabelingService¶
- class google.cloud.datalabeling_v1beta1.services.data_labeling_service.DataLabelingServiceAsyncClient(*, credentials: typing.Optional[google.auth.credentials.Credentials] = None, transport: typing.Optional[typing.Union[str, google.cloud.datalabeling_v1beta1.services.data_labeling_service.transports.base.DataLabelingServiceTransport, typing.Callable[[...], google.cloud.datalabeling_v1beta1.services.data_labeling_service.transports.base.DataLabelingServiceTransport]]] = 'grpc_asyncio', client_options: typing.Optional[google.api_core.client_options.ClientOptions] = None, client_info: google.api_core.gapic_v1.client_info.ClientInfo = <google.api_core.gapic_v1.client_info.ClientInfo object>)[source]¶
Service for the AI Platform Data Labeling API.
Instantiates the data labeling service async client.
- Parameters
credentials (Optional[google.auth.credentials.Credentials]) – The authorization credentials to attach to requests. These credentials identify the application to the service; if none are specified, the client will attempt to ascertain the credentials from the environment.
transport (Optional[Union[str,DataLabelingServiceTransport,Callable[..., DataLabelingServiceTransport]]]) – The transport to use, or a Callable that constructs and returns a new transport to use. If a Callable is given, it will be called with the same set of initialization arguments as used in the DataLabelingServiceTransport constructor. If set to None, a transport is chosen automatically.
client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]) –
Custom options for the client.
1. The
api_endpoint
property can be used to override the default endpoint provided by the client whentransport
is not explicitly provided. Only if this property is not set andtransport
was not explicitly provided, the endpoint is determined by the GOOGLE_API_USE_MTLS_ENDPOINT environment variable, which have one of the following values: “always” (always use the default mTLS endpoint), “never” (always use the default regular endpoint) and “auto” (auto-switch to the default mTLS endpoint if client certificate is present; this is the default value).2. If the GOOGLE_API_USE_CLIENT_CERTIFICATE environment variable is “true”, then the
client_cert_source
property can be used to provide a client certificate for mTLS transport. If not provided, the default SSL client certificate will be used if present. If GOOGLE_API_USE_CLIENT_CERTIFICATE is “false” or not set, no client certificate will be used.3. The
universe_domain
property can be used to override the default “googleapis.com” universe. Note thatapi_endpoint
property still takes precedence; anduniverse_domain
is currently not supported for mTLS.client_info (google.api_core.gapic_v1.client_info.ClientInfo) – The client info used to send a user-agent string along with API requests. If
None
, then default info will be used. Generally, you only need to set this if you’re developing your own client library.
- Raises
google.auth.exceptions.MutualTlsChannelError – If mutual TLS transport creation failed for any reason.
- static annotated_dataset_path(project: str, dataset: str, annotated_dataset: str) str ¶
Returns a fully-qualified annotated_dataset string.
- static annotation_spec_set_path(project: str, annotation_spec_set: str) str ¶
Returns a fully-qualified annotation_spec_set string.
- property api_endpoint¶
Return the API endpoint used by the client instance.
- Returns
The API endpoint used by the client instance.
- Return type
- static common_billing_account_path(billing_account: str) str ¶
Returns a fully-qualified billing_account string.
- static common_location_path(project: str, location: str) str ¶
Returns a fully-qualified location string.
- static common_organization_path(organization: str) str ¶
Returns a fully-qualified organization string.
- async create_annotation_spec_set(request: Optional[Union[google.cloud.datalabeling_v1beta1.types.data_labeling_service.CreateAnnotationSpecSetRequest, dict]] = None, *, parent: Optional[str] = None, annotation_spec_set: Optional[google.cloud.datalabeling_v1beta1.types.annotation_spec_set.AnnotationSpecSet] = None, retry: Optional[Union[google.api_core.retry.retry_unary_async.AsyncRetry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.cloud.datalabeling_v1beta1.types.annotation_spec_set.AnnotationSpecSet [source]¶
Creates an annotation spec set by providing a set of labels.
# This snippet has been automatically generated and should be regarded as a # code template only. # It will require modifications to work: # - It may require correct/in-range values for request initialization. # - It may require specifying regional endpoints when creating the service # client as shown in: # https://googleapis.dev/python/google-api-core/latest/client_options.html from google.cloud import datalabeling_v1beta1 async def sample_create_annotation_spec_set(): # Create a client client = datalabeling_v1beta1.DataLabelingServiceAsyncClient() # Initialize request argument(s) request = datalabeling_v1beta1.CreateAnnotationSpecSetRequest( parent="parent_value", ) # Make the request response = await client.create_annotation_spec_set(request=request) # Handle the response print(response)
- Parameters
request (Optional[Union[google.cloud.datalabeling_v1beta1.types.CreateAnnotationSpecSetRequest, dict]]) – The request object. Request message for CreateAnnotationSpecSet.
parent (
str
) –Required. AnnotationSpecSet resource parent, format: projects/{project_id}
This corresponds to the
parent
field on therequest
instance; ifrequest
is provided, this should not be set.annotation_spec_set (
google.cloud.datalabeling_v1beta1.types.AnnotationSpecSet
) –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.
This corresponds to the
annotation_spec_set
field on therequest
instance; ifrequest
is provided, this should not be set.retry (google.api_core.retry_async.AsyncRetry) – Designation of what errors, if any, should be retried.
timeout (float) – The timeout for this request.
metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.
- Returns
An AnnotationSpecSet is a collection of label definitions. For example, in image classification tasks, you define a set of possible labels for images as an AnnotationSpecSet. An AnnotationSpecSet is immutable upon creation.
- Return type
- async create_dataset(request: Optional[Union[google.cloud.datalabeling_v1beta1.types.data_labeling_service.CreateDatasetRequest, dict]] = None, *, parent: Optional[str] = None, dataset: Optional[google.cloud.datalabeling_v1beta1.types.dataset.Dataset] = None, retry: Optional[Union[google.api_core.retry.retry_unary_async.AsyncRetry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.cloud.datalabeling_v1beta1.types.dataset.Dataset [source]¶
Creates dataset. If success return a Dataset resource.
# This snippet has been automatically generated and should be regarded as a # code template only. # It will require modifications to work: # - It may require correct/in-range values for request initialization. # - It may require specifying regional endpoints when creating the service # client as shown in: # https://googleapis.dev/python/google-api-core/latest/client_options.html from google.cloud import datalabeling_v1beta1 async def sample_create_dataset(): # Create a client client = datalabeling_v1beta1.DataLabelingServiceAsyncClient() # Initialize request argument(s) request = datalabeling_v1beta1.CreateDatasetRequest( parent="parent_value", ) # Make the request response = await client.create_dataset(request=request) # Handle the response print(response)
- Parameters
request (Optional[Union[google.cloud.datalabeling_v1beta1.types.CreateDatasetRequest, dict]]) – The request object. Request message for CreateDataset.
parent (
str
) –Required. Dataset resource parent, format: projects/{project_id}
This corresponds to the
parent
field on therequest
instance; ifrequest
is provided, this should not be set.dataset (
google.cloud.datalabeling_v1beta1.types.Dataset
) – Required. The dataset to be created. This corresponds to thedataset
field on therequest
instance; ifrequest
is provided, this should not be set.retry (google.api_core.retry_async.AsyncRetry) – Designation of what errors, if any, should be retried.
timeout (float) – The timeout for this request.
metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.
- Returns
Dataset is the resource to hold your data. You can request multiple labeling tasks for a dataset while each one will generate an AnnotatedDataset.
- Return type
- async create_evaluation_job(request: Optional[Union[google.cloud.datalabeling_v1beta1.types.data_labeling_service.CreateEvaluationJobRequest, dict]] = None, *, parent: Optional[str] = None, job: Optional[google.cloud.datalabeling_v1beta1.types.evaluation_job.EvaluationJob] = None, retry: Optional[Union[google.api_core.retry.retry_unary_async.AsyncRetry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.cloud.datalabeling_v1beta1.types.evaluation_job.EvaluationJob [source]¶
Creates an evaluation job.
# This snippet has been automatically generated and should be regarded as a # code template only. # It will require modifications to work: # - It may require correct/in-range values for request initialization. # - It may require specifying regional endpoints when creating the service # client as shown in: # https://googleapis.dev/python/google-api-core/latest/client_options.html from google.cloud import datalabeling_v1beta1 async def sample_create_evaluation_job(): # Create a client client = datalabeling_v1beta1.DataLabelingServiceAsyncClient() # Initialize request argument(s) request = datalabeling_v1beta1.CreateEvaluationJobRequest( parent="parent_value", ) # Make the request response = await client.create_evaluation_job(request=request) # Handle the response print(response)
- Parameters
request (Optional[Union[google.cloud.datalabeling_v1beta1.types.CreateEvaluationJobRequest, dict]]) – The request object. Request message for CreateEvaluationJob.
parent (
str
) –Required. Evaluation job resource parent. Format: “projects/{project_id}”
This corresponds to the
parent
field on therequest
instance; ifrequest
is provided, this should not be set.job (
google.cloud.datalabeling_v1beta1.types.EvaluationJob
) –Required. The evaluation job to create.
This corresponds to the
job
field on therequest
instance; ifrequest
is provided, this should not be set.retry (google.api_core.retry_async.AsyncRetry) – Designation of what errors, if any, should be retried.
timeout (float) – The timeout for this request.
metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.
- Returns
- Defines an evaluation job that runs periodically to generate
[Evaluations][google.cloud.datalabeling.v1beta1.Evaluation]. [Creating an evaluation job](/ml-engine/docs/continuous-evaluation/create-job) is the starting point for using continuous evaluation.
- Return type
- async create_instruction(request: Optional[Union[google.cloud.datalabeling_v1beta1.types.data_labeling_service.CreateInstructionRequest, dict]] = None, *, parent: Optional[str] = None, instruction: Optional[google.cloud.datalabeling_v1beta1.types.instruction.Instruction] = None, retry: Optional[Union[google.api_core.retry.retry_unary_async.AsyncRetry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.api_core.operation_async.AsyncOperation [source]¶
Creates an instruction for how data should be labeled.
# This snippet has been automatically generated and should be regarded as a # code template only. # It will require modifications to work: # - It may require correct/in-range values for request initialization. # - It may require specifying regional endpoints when creating the service # client as shown in: # https://googleapis.dev/python/google-api-core/latest/client_options.html from google.cloud import datalabeling_v1beta1 async def sample_create_instruction(): # Create a client client = datalabeling_v1beta1.DataLabelingServiceAsyncClient() # Initialize request argument(s) request = datalabeling_v1beta1.CreateInstructionRequest( parent="parent_value", ) # Make the request operation = client.create_instruction(request=request) print("Waiting for operation to complete...") response = (await operation).result() # Handle the response print(response)
- Parameters
request (Optional[Union[google.cloud.datalabeling_v1beta1.types.CreateInstructionRequest, dict]]) – The request object. Request message for CreateInstruction.
parent (
str
) –Required. Instruction resource parent, format: projects/{project_id}
This corresponds to the
parent
field on therequest
instance; ifrequest
is provided, this should not be set.instruction (
google.cloud.datalabeling_v1beta1.types.Instruction
) –Required. Instruction of how to perform the labeling task.
This corresponds to the
instruction
field on therequest
instance; ifrequest
is provided, this should not be set.retry (google.api_core.retry_async.AsyncRetry) – Designation of what errors, if any, should be retried.
timeout (float) – The timeout for this request.
metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.
- Returns
An object representing a long-running operation.
- The result type for the operation will be
google.cloud.datalabeling_v1beta1.types.Instruction
Instruction of how to perform the labeling task for human operators. Currently only PDF instruction is supported.
- The result type for the operation will be
- Return type
- static data_item_path(project: str, dataset: str, data_item: str) str ¶
Returns a fully-qualified data_item string.
- async delete_annotated_dataset(request: Optional[Union[google.cloud.datalabeling_v1beta1.types.data_labeling_service.DeleteAnnotatedDatasetRequest, dict]] = None, *, retry: Optional[Union[google.api_core.retry.retry_unary_async.AsyncRetry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) None [source]¶
Deletes an annotated dataset by resource name.
# This snippet has been automatically generated and should be regarded as a # code template only. # It will require modifications to work: # - It may require correct/in-range values for request initialization. # - It may require specifying regional endpoints when creating the service # client as shown in: # https://googleapis.dev/python/google-api-core/latest/client_options.html from google.cloud import datalabeling_v1beta1 async def sample_delete_annotated_dataset(): # Create a client client = datalabeling_v1beta1.DataLabelingServiceAsyncClient() # Initialize request argument(s) request = datalabeling_v1beta1.DeleteAnnotatedDatasetRequest( name="name_value", ) # Make the request await client.delete_annotated_dataset(request=request)
- Parameters
request (Optional[Union[google.cloud.datalabeling_v1beta1.types.DeleteAnnotatedDatasetRequest, dict]]) – The request object. Request message for DeleteAnnotatedDataset.
retry (google.api_core.retry_async.AsyncRetry) – Designation of what errors, if any, should be retried.
timeout (float) – The timeout for this request.
metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.
- async delete_annotation_spec_set(request: Optional[Union[google.cloud.datalabeling_v1beta1.types.data_labeling_service.DeleteAnnotationSpecSetRequest, dict]] = None, *, name: Optional[str] = None, retry: Optional[Union[google.api_core.retry.retry_unary_async.AsyncRetry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) None [source]¶
Deletes an annotation spec set by resource name.
# This snippet has been automatically generated and should be regarded as a # code template only. # It will require modifications to work: # - It may require correct/in-range values for request initialization. # - It may require specifying regional endpoints when creating the service # client as shown in: # https://googleapis.dev/python/google-api-core/latest/client_options.html from google.cloud import datalabeling_v1beta1 async def sample_delete_annotation_spec_set(): # Create a client client = datalabeling_v1beta1.DataLabelingServiceAsyncClient() # Initialize request argument(s) request = datalabeling_v1beta1.DeleteAnnotationSpecSetRequest( name="name_value", ) # Make the request await client.delete_annotation_spec_set(request=request)
- Parameters
request (Optional[Union[google.cloud.datalabeling_v1beta1.types.DeleteAnnotationSpecSetRequest, dict]]) – The request object. Request message for DeleteAnnotationSpecSet.
name (
str
) –Required. AnnotationSpec resource name, format:
projects/{project_id}/annotationSpecSets/{annotation_spec_set_id}
.This corresponds to the
name
field on therequest
instance; ifrequest
is provided, this should not be set.retry (google.api_core.retry_async.AsyncRetry) – Designation of what errors, if any, should be retried.
timeout (float) – The timeout for this request.
metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.
- async delete_dataset(request: Optional[Union[google.cloud.datalabeling_v1beta1.types.data_labeling_service.DeleteDatasetRequest, dict]] = None, *, name: Optional[str] = None, retry: Optional[Union[google.api_core.retry.retry_unary_async.AsyncRetry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) None [source]¶
Deletes a dataset by resource name.
# This snippet has been automatically generated and should be regarded as a # code template only. # It will require modifications to work: # - It may require correct/in-range values for request initialization. # - It may require specifying regional endpoints when creating the service # client as shown in: # https://googleapis.dev/python/google-api-core/latest/client_options.html from google.cloud import datalabeling_v1beta1 async def sample_delete_dataset(): # Create a client client = datalabeling_v1beta1.DataLabelingServiceAsyncClient() # Initialize request argument(s) request = datalabeling_v1beta1.DeleteDatasetRequest( name="name_value", ) # Make the request await client.delete_dataset(request=request)
- Parameters
request (Optional[Union[google.cloud.datalabeling_v1beta1.types.DeleteDatasetRequest, dict]]) – The request object. Request message for DeleteDataset.
name (
str
) –Required. Dataset resource name, format: projects/{project_id}/datasets/{dataset_id}
This corresponds to the
name
field on therequest
instance; ifrequest
is provided, this should not be set.retry (google.api_core.retry_async.AsyncRetry) – Designation of what errors, if any, should be retried.
timeout (float) – The timeout for this request.
metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.
- async delete_evaluation_job(request: Optional[Union[google.cloud.datalabeling_v1beta1.types.data_labeling_service.DeleteEvaluationJobRequest, dict]] = None, *, name: Optional[str] = None, retry: Optional[Union[google.api_core.retry.retry_unary_async.AsyncRetry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) None [source]¶
Stops and deletes an evaluation job.
# This snippet has been automatically generated and should be regarded as a # code template only. # It will require modifications to work: # - It may require correct/in-range values for request initialization. # - It may require specifying regional endpoints when creating the service # client as shown in: # https://googleapis.dev/python/google-api-core/latest/client_options.html from google.cloud import datalabeling_v1beta1 async def sample_delete_evaluation_job(): # Create a client client = datalabeling_v1beta1.DataLabelingServiceAsyncClient() # Initialize request argument(s) request = datalabeling_v1beta1.DeleteEvaluationJobRequest( name="name_value", ) # Make the request await client.delete_evaluation_job(request=request)
- Parameters
request (Optional[Union[google.cloud.datalabeling_v1beta1.types.DeleteEvaluationJobRequest, dict]]) – The request object. Request message DeleteEvaluationJob.
name (
str
) –Required. Name of the evaluation job that is going to be deleted. Format:
”projects/{project_id}/evaluationJobs/{evaluation_job_id}”
This corresponds to the
name
field on therequest
instance; ifrequest
is provided, this should not be set.retry (google.api_core.retry_async.AsyncRetry) – Designation of what errors, if any, should be retried.
timeout (float) – The timeout for this request.
metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.
- async delete_instruction(request: Optional[Union[google.cloud.datalabeling_v1beta1.types.data_labeling_service.DeleteInstructionRequest, dict]] = None, *, name: Optional[str] = None, retry: Optional[Union[google.api_core.retry.retry_unary_async.AsyncRetry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) None [source]¶
Deletes an instruction object by resource name.
# This snippet has been automatically generated and should be regarded as a # code template only. # It will require modifications to work: # - It may require correct/in-range values for request initialization. # - It may require specifying regional endpoints when creating the service # client as shown in: # https://googleapis.dev/python/google-api-core/latest/client_options.html from google.cloud import datalabeling_v1beta1 async def sample_delete_instruction(): # Create a client client = datalabeling_v1beta1.DataLabelingServiceAsyncClient() # Initialize request argument(s) request = datalabeling_v1beta1.DeleteInstructionRequest( name="name_value", ) # Make the request await client.delete_instruction(request=request)
- Parameters
request (Optional[Union[google.cloud.datalabeling_v1beta1.types.DeleteInstructionRequest, dict]]) – The request object. Request message for DeleteInstruction.
name (
str
) –Required. Instruction resource name, format: projects/{project_id}/instructions/{instruction_id}
This corresponds to the
name
field on therequest
instance; ifrequest
is provided, this should not be set.retry (google.api_core.retry_async.AsyncRetry) – Designation of what errors, if any, should be retried.
timeout (float) – The timeout for this request.
metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.
- static evaluation_job_path(project: str, evaluation_job: str) str ¶
Returns a fully-qualified evaluation_job string.
- static evaluation_path(project: str, dataset: str, evaluation: str) str ¶
Returns a fully-qualified evaluation string.
- static example_path(project: str, dataset: str, annotated_dataset: str, example: str) str ¶
Returns a fully-qualified example string.
- async export_data(request: Optional[Union[google.cloud.datalabeling_v1beta1.types.data_labeling_service.ExportDataRequest, dict]] = None, *, name: Optional[str] = None, annotated_dataset: Optional[str] = None, filter: Optional[str] = None, output_config: Optional[google.cloud.datalabeling_v1beta1.types.dataset.OutputConfig] = None, retry: Optional[Union[google.api_core.retry.retry_unary_async.AsyncRetry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.api_core.operation_async.AsyncOperation [source]¶
Exports data and annotations from dataset.
# This snippet has been automatically generated and should be regarded as a # code template only. # It will require modifications to work: # - It may require correct/in-range values for request initialization. # - It may require specifying regional endpoints when creating the service # client as shown in: # https://googleapis.dev/python/google-api-core/latest/client_options.html from google.cloud import datalabeling_v1beta1 async def sample_export_data(): # Create a client client = datalabeling_v1beta1.DataLabelingServiceAsyncClient() # Initialize request argument(s) request = datalabeling_v1beta1.ExportDataRequest( name="name_value", annotated_dataset="annotated_dataset_value", ) # Make the request operation = client.export_data(request=request) print("Waiting for operation to complete...") response = (await operation).result() # Handle the response print(response)
- Parameters
request (Optional[Union[google.cloud.datalabeling_v1beta1.types.ExportDataRequest, dict]]) – The request object. Request message for ExportData API.
name (
str
) –Required. Dataset resource name, format: projects/{project_id}/datasets/{dataset_id}
This corresponds to the
name
field on therequest
instance; ifrequest
is provided, this should not be set.annotated_dataset (
str
) –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}
This corresponds to the
annotated_dataset
field on therequest
instance; ifrequest
is provided, this should not be set.filter (
str
) –Optional. Filter is not supported at this moment.
This corresponds to the
filter
field on therequest
instance; ifrequest
is provided, this should not be set.output_config (
google.cloud.datalabeling_v1beta1.types.OutputConfig
) –Required. Specify the output destination.
This corresponds to the
output_config
field on therequest
instance; ifrequest
is provided, this should not be set.retry (google.api_core.retry_async.AsyncRetry) – Designation of what errors, if any, should be retried.
timeout (float) – The timeout for this request.
metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.
- Returns
An object representing a long-running operation.
The result type for the operation will be
google.cloud.datalabeling_v1beta1.types.ExportDataOperationResponse
Response used for ExportDataset longrunning operation.- Return type
- classmethod from_service_account_file(filename: str, *args, **kwargs)[source]¶
- Creates an instance of this client using the provided credentials
file.
- Parameters
filename (str) – The path to the service account private key json file.
args – Additional arguments to pass to the constructor.
kwargs – Additional arguments to pass to the constructor.
- Returns
The constructed client.
- Return type
- classmethod from_service_account_info(info: dict, *args, **kwargs)[source]¶
- Creates an instance of this client using the provided credentials
info.
- Parameters
info (dict) – The service account private key info.
args – Additional arguments to pass to the constructor.
kwargs – Additional arguments to pass to the constructor.
- Returns
The constructed client.
- Return type
- classmethod from_service_account_json(filename: str, *args, **kwargs)¶
- Creates an instance of this client using the provided credentials
file.
- Parameters
filename (str) – The path to the service account private key json file.
args – Additional arguments to pass to the constructor.
kwargs – Additional arguments to pass to the constructor.
- Returns
The constructed client.
- Return type
- async get_annotated_dataset(request: Optional[Union[google.cloud.datalabeling_v1beta1.types.data_labeling_service.GetAnnotatedDatasetRequest, dict]] = None, *, name: Optional[str] = None, retry: Optional[Union[google.api_core.retry.retry_unary_async.AsyncRetry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.cloud.datalabeling_v1beta1.types.dataset.AnnotatedDataset [source]¶
Gets an annotated dataset by resource name.
# This snippet has been automatically generated and should be regarded as a # code template only. # It will require modifications to work: # - It may require correct/in-range values for request initialization. # - It may require specifying regional endpoints when creating the service # client as shown in: # https://googleapis.dev/python/google-api-core/latest/client_options.html from google.cloud import datalabeling_v1beta1 async def sample_get_annotated_dataset(): # Create a client client = datalabeling_v1beta1.DataLabelingServiceAsyncClient() # Initialize request argument(s) request = datalabeling_v1beta1.GetAnnotatedDatasetRequest( name="name_value", ) # Make the request response = await client.get_annotated_dataset(request=request) # Handle the response print(response)
- Parameters
request (Optional[Union[google.cloud.datalabeling_v1beta1.types.GetAnnotatedDatasetRequest, dict]]) – The request object. Request message for GetAnnotatedDataset.
name (
str
) –Required. Name of the annotated dataset to get, format: projects/{project_id}/datasets/{dataset_id}/annotatedDatasets/ {annotated_dataset_id}
This corresponds to the
name
field on therequest
instance; ifrequest
is provided, this should not be set.retry (google.api_core.retry_async.AsyncRetry) – Designation of what errors, if any, should be retried.
timeout (float) – The timeout for this request.
metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.
- Returns
AnnotatedDataset is a set holding annotations for data in a Dataset. Each labeling task will generate an AnnotatedDataset under the Dataset that the task is requested for.
- Return type
- async get_annotation_spec_set(request: Optional[Union[google.cloud.datalabeling_v1beta1.types.data_labeling_service.GetAnnotationSpecSetRequest, dict]] = None, *, name: Optional[str] = None, retry: Optional[Union[google.api_core.retry.retry_unary_async.AsyncRetry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.cloud.datalabeling_v1beta1.types.annotation_spec_set.AnnotationSpecSet [source]¶
Gets an annotation spec set by resource name.
# This snippet has been automatically generated and should be regarded as a # code template only. # It will require modifications to work: # - It may require correct/in-range values for request initialization. # - It may require specifying regional endpoints when creating the service # client as shown in: # https://googleapis.dev/python/google-api-core/latest/client_options.html from google.cloud import datalabeling_v1beta1 async def sample_get_annotation_spec_set(): # Create a client client = datalabeling_v1beta1.DataLabelingServiceAsyncClient() # Initialize request argument(s) request = datalabeling_v1beta1.GetAnnotationSpecSetRequest( name="name_value", ) # Make the request response = await client.get_annotation_spec_set(request=request) # Handle the response print(response)
- Parameters
request (Optional[Union[google.cloud.datalabeling_v1beta1.types.GetAnnotationSpecSetRequest, dict]]) – The request object. Request message for GetAnnotationSpecSet.
name (
str
) –Required. AnnotationSpecSet resource name, format: projects/{project_id}/annotationSpecSets/{annotation_spec_set_id}
This corresponds to the
name
field on therequest
instance; ifrequest
is provided, this should not be set.retry (google.api_core.retry_async.AsyncRetry) – Designation of what errors, if any, should be retried.
timeout (float) – The timeout for this request.
metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.
- Returns
An AnnotationSpecSet is a collection of label definitions. For example, in image classification tasks, you define a set of possible labels for images as an AnnotationSpecSet. An AnnotationSpecSet is immutable upon creation.
- Return type
- async get_data_item(request: Optional[Union[google.cloud.datalabeling_v1beta1.types.data_labeling_service.GetDataItemRequest, dict]] = None, *, name: Optional[str] = None, retry: Optional[Union[google.api_core.retry.retry_unary_async.AsyncRetry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.cloud.datalabeling_v1beta1.types.dataset.DataItem [source]¶
Gets a data item in a dataset by resource name. This API can be called after data are imported into dataset.
# This snippet has been automatically generated and should be regarded as a # code template only. # It will require modifications to work: # - It may require correct/in-range values for request initialization. # - It may require specifying regional endpoints when creating the service # client as shown in: # https://googleapis.dev/python/google-api-core/latest/client_options.html from google.cloud import datalabeling_v1beta1 async def sample_get_data_item(): # Create a client client = datalabeling_v1beta1.DataLabelingServiceAsyncClient() # Initialize request argument(s) request = datalabeling_v1beta1.GetDataItemRequest( name="name_value", ) # Make the request response = await client.get_data_item(request=request) # Handle the response print(response)
- Parameters
request (Optional[Union[google.cloud.datalabeling_v1beta1.types.GetDataItemRequest, dict]]) – The request object. Request message for GetDataItem.
name (
str
) –Required. The name of the data item to get, format: projects/{project_id}/datasets/{dataset_id}/dataItems/{data_item_id}
This corresponds to the
name
field on therequest
instance; ifrequest
is provided, this should not be set.retry (google.api_core.retry_async.AsyncRetry) – Designation of what errors, if any, should be retried.
timeout (float) – The timeout for this request.
metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.
- Returns
DataItem is a piece of data, without annotation. For example, an image.
- Return type
- async get_dataset(request: Optional[Union[google.cloud.datalabeling_v1beta1.types.data_labeling_service.GetDatasetRequest, dict]] = None, *, name: Optional[str] = None, retry: Optional[Union[google.api_core.retry.retry_unary_async.AsyncRetry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.cloud.datalabeling_v1beta1.types.dataset.Dataset [source]¶
Gets dataset by resource name.
# This snippet has been automatically generated and should be regarded as a # code template only. # It will require modifications to work: # - It may require correct/in-range values for request initialization. # - It may require specifying regional endpoints when creating the service # client as shown in: # https://googleapis.dev/python/google-api-core/latest/client_options.html from google.cloud import datalabeling_v1beta1 async def sample_get_dataset(): # Create a client client = datalabeling_v1beta1.DataLabelingServiceAsyncClient() # Initialize request argument(s) request = datalabeling_v1beta1.GetDatasetRequest( name="name_value", ) # Make the request response = await client.get_dataset(request=request) # Handle the response print(response)
- Parameters
request (Optional[Union[google.cloud.datalabeling_v1beta1.types.GetDatasetRequest, dict]]) – The request object. Request message for GetDataSet.
name (
str
) –Required. Dataset resource name, format: projects/{project_id}/datasets/{dataset_id}
This corresponds to the
name
field on therequest
instance; ifrequest
is provided, this should not be set.retry (google.api_core.retry_async.AsyncRetry) – Designation of what errors, if any, should be retried.
timeout (float) – The timeout for this request.
metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.
- Returns
Dataset is the resource to hold your data. You can request multiple labeling tasks for a dataset while each one will generate an AnnotatedDataset.
- Return type
- async get_evaluation(request: Optional[Union[google.cloud.datalabeling_v1beta1.types.data_labeling_service.GetEvaluationRequest, dict]] = None, *, name: Optional[str] = None, retry: Optional[Union[google.api_core.retry.retry_unary_async.AsyncRetry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.cloud.datalabeling_v1beta1.types.evaluation.Evaluation [source]¶
Gets an evaluation by resource name (to search, use [projects.evaluations.search][google.cloud.datalabeling.v1beta1.DataLabelingService.SearchEvaluations]).
# This snippet has been automatically generated and should be regarded as a # code template only. # It will require modifications to work: # - It may require correct/in-range values for request initialization. # - It may require specifying regional endpoints when creating the service # client as shown in: # https://googleapis.dev/python/google-api-core/latest/client_options.html from google.cloud import datalabeling_v1beta1 async def sample_get_evaluation(): # Create a client client = datalabeling_v1beta1.DataLabelingServiceAsyncClient() # Initialize request argument(s) request = datalabeling_v1beta1.GetEvaluationRequest( name="name_value", ) # Make the request response = await client.get_evaluation(request=request) # Handle the response print(response)
- Parameters
request (Optional[Union[google.cloud.datalabeling_v1beta1.types.GetEvaluationRequest, dict]]) – The request object. Request message for GetEvaluation.
name (
str
) –Required. Name of the evaluation. Format:
”projects/{project_id}/datasets/{dataset_id}/evaluations/{evaluation_id}’
This corresponds to the
name
field on therequest
instance; ifrequest
is provided, this should not be set.retry (google.api_core.retry_async.AsyncRetry) – Designation of what errors, if any, should be retried.
timeout (float) – The timeout for this request.
metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.
- Returns
- Describes an evaluation between a machine learning model’s predictions and
ground truth labels. Created when an [EvaluationJob][google.cloud.datalabeling.v1beta1.EvaluationJob] runs successfully.
- Return type
- async get_evaluation_job(request: Optional[Union[google.cloud.datalabeling_v1beta1.types.data_labeling_service.GetEvaluationJobRequest, dict]] = None, *, name: Optional[str] = None, retry: Optional[Union[google.api_core.retry.retry_unary_async.AsyncRetry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.cloud.datalabeling_v1beta1.types.evaluation_job.EvaluationJob [source]¶
Gets an evaluation job by resource name.
# This snippet has been automatically generated and should be regarded as a # code template only. # It will require modifications to work: # - It may require correct/in-range values for request initialization. # - It may require specifying regional endpoints when creating the service # client as shown in: # https://googleapis.dev/python/google-api-core/latest/client_options.html from google.cloud import datalabeling_v1beta1 async def sample_get_evaluation_job(): # Create a client client = datalabeling_v1beta1.DataLabelingServiceAsyncClient() # Initialize request argument(s) request = datalabeling_v1beta1.GetEvaluationJobRequest( name="name_value", ) # Make the request response = await client.get_evaluation_job(request=request) # Handle the response print(response)
- Parameters
request (Optional[Union[google.cloud.datalabeling_v1beta1.types.GetEvaluationJobRequest, dict]]) – The request object. Request message for GetEvaluationJob.
name (
str
) –Required. Name of the evaluation job. Format:
”projects/{project_id}/evaluationJobs/{evaluation_job_id}”
This corresponds to the
name
field on therequest
instance; ifrequest
is provided, this should not be set.retry (google.api_core.retry_async.AsyncRetry) – Designation of what errors, if any, should be retried.
timeout (float) – The timeout for this request.
metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.
- Returns
- Defines an evaluation job that runs periodically to generate
[Evaluations][google.cloud.datalabeling.v1beta1.Evaluation]. [Creating an evaluation job](/ml-engine/docs/continuous-evaluation/create-job) is the starting point for using continuous evaluation.
- Return type
- async get_example(request: Optional[Union[google.cloud.datalabeling_v1beta1.types.data_labeling_service.GetExampleRequest, dict]] = None, *, name: Optional[str] = None, filter: Optional[str] = None, retry: Optional[Union[google.api_core.retry.retry_unary_async.AsyncRetry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.cloud.datalabeling_v1beta1.types.dataset.Example [source]¶
Gets an example by resource name, including both data and annotation.
# This snippet has been automatically generated and should be regarded as a # code template only. # It will require modifications to work: # - It may require correct/in-range values for request initialization. # - It may require specifying regional endpoints when creating the service # client as shown in: # https://googleapis.dev/python/google-api-core/latest/client_options.html from google.cloud import datalabeling_v1beta1 async def sample_get_example(): # Create a client client = datalabeling_v1beta1.DataLabelingServiceAsyncClient() # Initialize request argument(s) request = datalabeling_v1beta1.GetExampleRequest( name="name_value", ) # Make the request response = await client.get_example(request=request) # Handle the response print(response)
- Parameters
request (Optional[Union[google.cloud.datalabeling_v1beta1.types.GetExampleRequest, dict]]) – The request object. Request message for GetExample
name (
str
) –Required. Name of example, format: projects/{project_id}/datasets/{dataset_id}/annotatedDatasets/ {annotated_dataset_id}/examples/{example_id}
This corresponds to the
name
field on therequest
instance; ifrequest
is provided, this should not be set.filter (
str
) –Optional. An expression for filtering Examples. Filter by annotation_spec.display_name is supported. Format “annotation_spec.display_name = {display_name}”
This corresponds to the
filter
field on therequest
instance; ifrequest
is provided, this should not be set.retry (google.api_core.retry_async.AsyncRetry) – Designation of what errors, if any, should be retried.
timeout (float) – The timeout for this request.
metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.
- Returns
An Example is a piece of data and its annotation. For example, an image with label “house”.
- Return type
- async get_instruction(request: Optional[Union[google.cloud.datalabeling_v1beta1.types.data_labeling_service.GetInstructionRequest, dict]] = None, *, name: Optional[str] = None, retry: Optional[Union[google.api_core.retry.retry_unary_async.AsyncRetry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.cloud.datalabeling_v1beta1.types.instruction.Instruction [source]¶
Gets an instruction by resource name.
# This snippet has been automatically generated and should be regarded as a # code template only. # It will require modifications to work: # - It may require correct/in-range values for request initialization. # - It may require specifying regional endpoints when creating the service # client as shown in: # https://googleapis.dev/python/google-api-core/latest/client_options.html from google.cloud import datalabeling_v1beta1 async def sample_get_instruction(): # Create a client client = datalabeling_v1beta1.DataLabelingServiceAsyncClient() # Initialize request argument(s) request = datalabeling_v1beta1.GetInstructionRequest( name="name_value", ) # Make the request response = await client.get_instruction(request=request) # Handle the response print(response)
- Parameters
request (Optional[Union[google.cloud.datalabeling_v1beta1.types.GetInstructionRequest, dict]]) – The request object. Request message for GetInstruction.
name (
str
) –Required. Instruction resource name, format: projects/{project_id}/instructions/{instruction_id}
This corresponds to the
name
field on therequest
instance; ifrequest
is provided, this should not be set.retry (google.api_core.retry_async.AsyncRetry) – Designation of what errors, if any, should be retried.
timeout (float) – The timeout for this request.
metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.
- Returns
Instruction of how to perform the labeling task for human operators. Currently only PDF instruction is supported.
- Return type
- classmethod get_mtls_endpoint_and_cert_source(client_options: Optional[google.api_core.client_options.ClientOptions] = None)[source]¶
Return the API endpoint and client cert source for mutual TLS.
The client cert source is determined in the following order: (1) if GOOGLE_API_USE_CLIENT_CERTIFICATE environment variable is not “true”, the client cert source is None. (2) if client_options.client_cert_source is provided, use the provided one; if the default client cert source exists, use the default one; otherwise the client cert source is None.
The API endpoint is determined in the following order: (1) if client_options.api_endpoint if provided, use the provided one. (2) if GOOGLE_API_USE_CLIENT_CERTIFICATE environment variable is “always”, use the default mTLS endpoint; if the environment variable is “never”, use the default API endpoint; otherwise if client cert source exists, use the default mTLS endpoint, otherwise use the default API endpoint.
More details can be found at https://google.aip.dev/auth/4114.
- Parameters
client_options (google.api_core.client_options.ClientOptions) – Custom options for the client. Only the api_endpoint and client_cert_source properties may be used in this method.
- Returns
- returns the API endpoint and the
client cert source to use.
- Return type
- Raises
google.auth.exceptions.MutualTLSChannelError – If any errors happen.
- classmethod get_transport_class(label: Optional[str] = None) Type[google.cloud.datalabeling_v1beta1.services.data_labeling_service.transports.base.DataLabelingServiceTransport] ¶
Returns an appropriate transport class.
- Parameters
label – The name of the desired transport. If none is provided, then the first transport in the registry is used.
- Returns
The transport class to use.
- async import_data(request: Optional[Union[google.cloud.datalabeling_v1beta1.types.data_labeling_service.ImportDataRequest, dict]] = None, *, name: Optional[str] = None, input_config: Optional[google.cloud.datalabeling_v1beta1.types.dataset.InputConfig] = None, retry: Optional[Union[google.api_core.retry.retry_unary_async.AsyncRetry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.api_core.operation_async.AsyncOperation [source]¶
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.
# This snippet has been automatically generated and should be regarded as a # code template only. # It will require modifications to work: # - It may require correct/in-range values for request initialization. # - It may require specifying regional endpoints when creating the service # client as shown in: # https://googleapis.dev/python/google-api-core/latest/client_options.html from google.cloud import datalabeling_v1beta1 async def sample_import_data(): # Create a client client = datalabeling_v1beta1.DataLabelingServiceAsyncClient() # Initialize request argument(s) request = datalabeling_v1beta1.ImportDataRequest( name="name_value", ) # Make the request operation = client.import_data(request=request) print("Waiting for operation to complete...") response = (await operation).result() # Handle the response print(response)
- Parameters
request (Optional[Union[google.cloud.datalabeling_v1beta1.types.ImportDataRequest, dict]]) – The request object. Request message for ImportData API.
name (
str
) –Required. Dataset resource name, format: projects/{project_id}/datasets/{dataset_id}
This corresponds to the
name
field on therequest
instance; ifrequest
is provided, this should not be set.input_config (
google.cloud.datalabeling_v1beta1.types.InputConfig
) –Required. Specify the input source of the data.
This corresponds to the
input_config
field on therequest
instance; ifrequest
is provided, this should not be set.retry (google.api_core.retry_async.AsyncRetry) – Designation of what errors, if any, should be retried.
timeout (float) – The timeout for this request.
metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.
- Returns
An object representing a long-running operation.
The result type for the operation will be
google.cloud.datalabeling_v1beta1.types.ImportDataOperationResponse
Response used for ImportData longrunning operation.- Return type
- static instruction_path(project: str, instruction: str) str ¶
Returns a fully-qualified instruction string.
- async label_image(request: Optional[Union[google.cloud.datalabeling_v1beta1.types.data_labeling_service.LabelImageRequest, dict]] = None, *, parent: Optional[str] = None, basic_config: Optional[google.cloud.datalabeling_v1beta1.types.human_annotation_config.HumanAnnotationConfig] = None, feature: Optional[google.cloud.datalabeling_v1beta1.types.data_labeling_service.LabelImageRequest.Feature] = None, retry: Optional[Union[google.api_core.retry.retry_unary_async.AsyncRetry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.api_core.operation_async.AsyncOperation [source]¶
Starts a labeling task for image. The type of image labeling task is configured by feature in the request.
# This snippet has been automatically generated and should be regarded as a # code template only. # It will require modifications to work: # - It may require correct/in-range values for request initialization. # - It may require specifying regional endpoints when creating the service # client as shown in: # https://googleapis.dev/python/google-api-core/latest/client_options.html from google.cloud import datalabeling_v1beta1 async def sample_label_image(): # Create a client client = datalabeling_v1beta1.DataLabelingServiceAsyncClient() # Initialize request argument(s) image_classification_config = datalabeling_v1beta1.ImageClassificationConfig() image_classification_config.annotation_spec_set = "annotation_spec_set_value" basic_config = datalabeling_v1beta1.HumanAnnotationConfig() basic_config.instruction = "instruction_value" basic_config.annotated_dataset_display_name = "annotated_dataset_display_name_value" request = datalabeling_v1beta1.LabelImageRequest( image_classification_config=image_classification_config, parent="parent_value", basic_config=basic_config, feature="SEGMENTATION", ) # Make the request operation = client.label_image(request=request) print("Waiting for operation to complete...") response = (await operation).result() # Handle the response print(response)
- Parameters
request (Optional[Union[google.cloud.datalabeling_v1beta1.types.LabelImageRequest, dict]]) – The request object. Request message for starting an image labeling task.
parent (
str
) –Required. Name of the dataset to request labeling task, format: projects/{project_id}/datasets/{dataset_id}
This corresponds to the
parent
field on therequest
instance; ifrequest
is provided, this should not be set.basic_config (
google.cloud.datalabeling_v1beta1.types.HumanAnnotationConfig
) –Required. Basic human annotation config.
This corresponds to the
basic_config
field on therequest
instance; ifrequest
is provided, this should not be set.feature (
google.cloud.datalabeling_v1beta1.types.LabelImageRequest.Feature
) –Required. The type of image labeling task.
This corresponds to the
feature
field on therequest
instance; ifrequest
is provided, this should not be set.retry (google.api_core.retry_async.AsyncRetry) – Designation of what errors, if any, should be retried.
timeout (float) – The timeout for this request.
metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.
- Returns
An object representing a long-running operation.
- The result type for the operation will be
google.cloud.datalabeling_v1beta1.types.AnnotatedDataset
AnnotatedDataset is a set holding annotations for data in a Dataset. Each labeling task will generate an AnnotatedDataset under the Dataset that the task is requested for.
- The result type for the operation will be
- Return type
- async label_text(request: Optional[Union[google.cloud.datalabeling_v1beta1.types.data_labeling_service.LabelTextRequest, dict]] = None, *, parent: Optional[str] = None, basic_config: Optional[google.cloud.datalabeling_v1beta1.types.human_annotation_config.HumanAnnotationConfig] = None, feature: Optional[google.cloud.datalabeling_v1beta1.types.data_labeling_service.LabelTextRequest.Feature] = None, retry: Optional[Union[google.api_core.retry.retry_unary_async.AsyncRetry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.api_core.operation_async.AsyncOperation [source]¶
Starts a labeling task for text. The type of text labeling task is configured by feature in the request.
# This snippet has been automatically generated and should be regarded as a # code template only. # It will require modifications to work: # - It may require correct/in-range values for request initialization. # - It may require specifying regional endpoints when creating the service # client as shown in: # https://googleapis.dev/python/google-api-core/latest/client_options.html from google.cloud import datalabeling_v1beta1 async def sample_label_text(): # Create a client client = datalabeling_v1beta1.DataLabelingServiceAsyncClient() # Initialize request argument(s) text_classification_config = datalabeling_v1beta1.TextClassificationConfig() text_classification_config.annotation_spec_set = "annotation_spec_set_value" basic_config = datalabeling_v1beta1.HumanAnnotationConfig() basic_config.instruction = "instruction_value" basic_config.annotated_dataset_display_name = "annotated_dataset_display_name_value" request = datalabeling_v1beta1.LabelTextRequest( text_classification_config=text_classification_config, parent="parent_value", basic_config=basic_config, feature="TEXT_ENTITY_EXTRACTION", ) # Make the request operation = client.label_text(request=request) print("Waiting for operation to complete...") response = (await operation).result() # Handle the response print(response)
- Parameters
request (Optional[Union[google.cloud.datalabeling_v1beta1.types.LabelTextRequest, dict]]) – The request object. Request message for LabelText.
parent (
str
) –Required. Name of the data set to request labeling task, format: projects/{project_id}/datasets/{dataset_id}
This corresponds to the
parent
field on therequest
instance; ifrequest
is provided, this should not be set.basic_config (
google.cloud.datalabeling_v1beta1.types.HumanAnnotationConfig
) –Required. Basic human annotation config.
This corresponds to the
basic_config
field on therequest
instance; ifrequest
is provided, this should not be set.feature (
google.cloud.datalabeling_v1beta1.types.LabelTextRequest.Feature
) –Required. The type of text labeling task.
This corresponds to the
feature
field on therequest
instance; ifrequest
is provided, this should not be set.retry (google.api_core.retry_async.AsyncRetry) – Designation of what errors, if any, should be retried.
timeout (float) – The timeout for this request.
metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.
- Returns
An object representing a long-running operation.
- The result type for the operation will be
google.cloud.datalabeling_v1beta1.types.AnnotatedDataset
AnnotatedDataset is a set holding annotations for data in a Dataset. Each labeling task will generate an AnnotatedDataset under the Dataset that the task is requested for.
- The result type for the operation will be
- Return type
- async label_video(request: Optional[Union[google.cloud.datalabeling_v1beta1.types.data_labeling_service.LabelVideoRequest, dict]] = None, *, parent: Optional[str] = None, basic_config: Optional[google.cloud.datalabeling_v1beta1.types.human_annotation_config.HumanAnnotationConfig] = None, feature: Optional[google.cloud.datalabeling_v1beta1.types.data_labeling_service.LabelVideoRequest.Feature] = None, retry: Optional[Union[google.api_core.retry.retry_unary_async.AsyncRetry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.api_core.operation_async.AsyncOperation [source]¶
Starts a labeling task for video. The type of video labeling task is configured by feature in the request.
# This snippet has been automatically generated and should be regarded as a # code template only. # It will require modifications to work: # - It may require correct/in-range values for request initialization. # - It may require specifying regional endpoints when creating the service # client as shown in: # https://googleapis.dev/python/google-api-core/latest/client_options.html from google.cloud import datalabeling_v1beta1 async def sample_label_video(): # Create a client client = datalabeling_v1beta1.DataLabelingServiceAsyncClient() # Initialize request argument(s) video_classification_config = datalabeling_v1beta1.VideoClassificationConfig() video_classification_config.annotation_spec_set_configs.annotation_spec_set = "annotation_spec_set_value" basic_config = datalabeling_v1beta1.HumanAnnotationConfig() basic_config.instruction = "instruction_value" basic_config.annotated_dataset_display_name = "annotated_dataset_display_name_value" request = datalabeling_v1beta1.LabelVideoRequest( video_classification_config=video_classification_config, parent="parent_value", basic_config=basic_config, feature="EVENT", ) # Make the request operation = client.label_video(request=request) print("Waiting for operation to complete...") response = (await operation).result() # Handle the response print(response)
- Parameters
request (Optional[Union[google.cloud.datalabeling_v1beta1.types.LabelVideoRequest, dict]]) – The request object. Request message for LabelVideo.
parent (
str
) –Required. Name of the dataset to request labeling task, format: projects/{project_id}/datasets/{dataset_id}
This corresponds to the
parent
field on therequest
instance; ifrequest
is provided, this should not be set.basic_config (
google.cloud.datalabeling_v1beta1.types.HumanAnnotationConfig
) –Required. Basic human annotation config.
This corresponds to the
basic_config
field on therequest
instance; ifrequest
is provided, this should not be set.feature (
google.cloud.datalabeling_v1beta1.types.LabelVideoRequest.Feature
) –Required. The type of video labeling task.
This corresponds to the
feature
field on therequest
instance; ifrequest
is provided, this should not be set.retry (google.api_core.retry_async.AsyncRetry) – Designation of what errors, if any, should be retried.
timeout (float) – The timeout for this request.
metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.
- Returns
An object representing a long-running operation.
- The result type for the operation will be
google.cloud.datalabeling_v1beta1.types.AnnotatedDataset
AnnotatedDataset is a set holding annotations for data in a Dataset. Each labeling task will generate an AnnotatedDataset under the Dataset that the task is requested for.
- The result type for the operation will be
- Return type
- async list_annotated_datasets(request: Optional[Union[google.cloud.datalabeling_v1beta1.types.data_labeling_service.ListAnnotatedDatasetsRequest, dict]] = None, *, parent: Optional[str] = None, filter: Optional[str] = None, retry: Optional[Union[google.api_core.retry.retry_unary_async.AsyncRetry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.cloud.datalabeling_v1beta1.services.data_labeling_service.pagers.ListAnnotatedDatasetsAsyncPager [source]¶
Lists annotated datasets for a dataset. Pagination is supported.
# This snippet has been automatically generated and should be regarded as a # code template only. # It will require modifications to work: # - It may require correct/in-range values for request initialization. # - It may require specifying regional endpoints when creating the service # client as shown in: # https://googleapis.dev/python/google-api-core/latest/client_options.html from google.cloud import datalabeling_v1beta1 async def sample_list_annotated_datasets(): # Create a client client = datalabeling_v1beta1.DataLabelingServiceAsyncClient() # Initialize request argument(s) request = datalabeling_v1beta1.ListAnnotatedDatasetsRequest( parent="parent_value", ) # Make the request page_result = client.list_annotated_datasets(request=request) # Handle the response async for response in page_result: print(response)
- Parameters
request (Optional[Union[google.cloud.datalabeling_v1beta1.types.ListAnnotatedDatasetsRequest, dict]]) – The request object. Request message for ListAnnotatedDatasets.
parent (
str
) –Required. Name of the dataset to list annotated datasets, format: projects/{project_id}/datasets/{dataset_id}
This corresponds to the
parent
field on therequest
instance; ifrequest
is provided, this should not be set.filter (
str
) –Optional. Filter is not supported at this moment.
This corresponds to the
filter
field on therequest
instance; ifrequest
is provided, this should not be set.retry (google.api_core.retry_async.AsyncRetry) – Designation of what errors, if any, should be retried.
timeout (float) – The timeout for this request.
metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.
- Returns
Results of listing annotated datasets for a dataset. Iterating over this object will yield results and resolve additional pages automatically.
- Return type
- async list_annotation_spec_sets(request: Optional[Union[google.cloud.datalabeling_v1beta1.types.data_labeling_service.ListAnnotationSpecSetsRequest, dict]] = None, *, parent: Optional[str] = None, filter: Optional[str] = None, retry: Optional[Union[google.api_core.retry.retry_unary_async.AsyncRetry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.cloud.datalabeling_v1beta1.services.data_labeling_service.pagers.ListAnnotationSpecSetsAsyncPager [source]¶
Lists annotation spec sets for a project. Pagination is supported.
# This snippet has been automatically generated and should be regarded as a # code template only. # It will require modifications to work: # - It may require correct/in-range values for request initialization. # - It may require specifying regional endpoints when creating the service # client as shown in: # https://googleapis.dev/python/google-api-core/latest/client_options.html from google.cloud import datalabeling_v1beta1 async def sample_list_annotation_spec_sets(): # Create a client client = datalabeling_v1beta1.DataLabelingServiceAsyncClient() # Initialize request argument(s) request = datalabeling_v1beta1.ListAnnotationSpecSetsRequest( parent="parent_value", ) # Make the request page_result = client.list_annotation_spec_sets(request=request) # Handle the response async for response in page_result: print(response)
- Parameters
request (Optional[Union[google.cloud.datalabeling_v1beta1.types.ListAnnotationSpecSetsRequest, dict]]) – The request object. Request message for ListAnnotationSpecSets.
parent (
str
) –Required. Parent of AnnotationSpecSet resource, format: projects/{project_id}
This corresponds to the
parent
field on therequest
instance; ifrequest
is provided, this should not be set.filter (
str
) –Optional. Filter is not supported at this moment.
This corresponds to the
filter
field on therequest
instance; ifrequest
is provided, this should not be set.retry (google.api_core.retry_async.AsyncRetry) – Designation of what errors, if any, should be retried.
timeout (float) – The timeout for this request.
metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.
- Returns
Results of listing annotation spec set under a project. Iterating over this object will yield results and resolve additional pages automatically.
- Return type
- async list_data_items(request: Optional[Union[google.cloud.datalabeling_v1beta1.types.data_labeling_service.ListDataItemsRequest, dict]] = None, *, parent: Optional[str] = None, filter: Optional[str] = None, retry: Optional[Union[google.api_core.retry.retry_unary_async.AsyncRetry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.cloud.datalabeling_v1beta1.services.data_labeling_service.pagers.ListDataItemsAsyncPager [source]¶
Lists data items in a dataset. This API can be called after data are imported into dataset. Pagination is supported.
# This snippet has been automatically generated and should be regarded as a # code template only. # It will require modifications to work: # - It may require correct/in-range values for request initialization. # - It may require specifying regional endpoints when creating the service # client as shown in: # https://googleapis.dev/python/google-api-core/latest/client_options.html from google.cloud import datalabeling_v1beta1 async def sample_list_data_items(): # Create a client client = datalabeling_v1beta1.DataLabelingServiceAsyncClient() # Initialize request argument(s) request = datalabeling_v1beta1.ListDataItemsRequest( parent="parent_value", ) # Make the request page_result = client.list_data_items(request=request) # Handle the response async for response in page_result: print(response)
- Parameters
request (Optional[Union[google.cloud.datalabeling_v1beta1.types.ListDataItemsRequest, dict]]) – The request object. Request message for ListDataItems.
parent (
str
) –Required. Name of the dataset to list data items, format: projects/{project_id}/datasets/{dataset_id}
This corresponds to the
parent
field on therequest
instance; ifrequest
is provided, this should not be set.filter (
str
) –Optional. Filter is not supported at this moment.
This corresponds to the
filter
field on therequest
instance; ifrequest
is provided, this should not be set.retry (google.api_core.retry_async.AsyncRetry) – Designation of what errors, if any, should be retried.
timeout (float) – The timeout for this request.
metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.
- Returns
Results of listing data items in a dataset. Iterating over this object will yield results and resolve additional pages automatically.
- Return type
google.cloud.datalabeling_v1beta1.services.data_labeling_service.pagers.ListDataItemsAsyncPager
- async list_datasets(request: Optional[Union[google.cloud.datalabeling_v1beta1.types.data_labeling_service.ListDatasetsRequest, dict]] = None, *, parent: Optional[str] = None, filter: Optional[str] = None, retry: Optional[Union[google.api_core.retry.retry_unary_async.AsyncRetry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.cloud.datalabeling_v1beta1.services.data_labeling_service.pagers.ListDatasetsAsyncPager [source]¶
Lists datasets under a project. Pagination is supported.
# This snippet has been automatically generated and should be regarded as a # code template only. # It will require modifications to work: # - It may require correct/in-range values for request initialization. # - It may require specifying regional endpoints when creating the service # client as shown in: # https://googleapis.dev/python/google-api-core/latest/client_options.html from google.cloud import datalabeling_v1beta1 async def sample_list_datasets(): # Create a client client = datalabeling_v1beta1.DataLabelingServiceAsyncClient() # Initialize request argument(s) request = datalabeling_v1beta1.ListDatasetsRequest( parent="parent_value", ) # Make the request page_result = client.list_datasets(request=request) # Handle the response async for response in page_result: print(response)
- Parameters
request (Optional[Union[google.cloud.datalabeling_v1beta1.types.ListDatasetsRequest, dict]]) – The request object. Request message for ListDataset.
parent (
str
) –Required. Dataset resource parent, format: projects/{project_id}
This corresponds to the
parent
field on therequest
instance; ifrequest
is provided, this should not be set.filter (
str
) –Optional. Filter on dataset is not supported at this moment.
This corresponds to the
filter
field on therequest
instance; ifrequest
is provided, this should not be set.retry (google.api_core.retry_async.AsyncRetry) – Designation of what errors, if any, should be retried.
timeout (float) – The timeout for this request.
metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.
- Returns
Results of listing datasets within a project. Iterating over this object will yield results and resolve additional pages automatically.
- Return type
google.cloud.datalabeling_v1beta1.services.data_labeling_service.pagers.ListDatasetsAsyncPager
- async list_evaluation_jobs(request: Optional[Union[google.cloud.datalabeling_v1beta1.types.data_labeling_service.ListEvaluationJobsRequest, dict]] = None, *, parent: Optional[str] = None, filter: Optional[str] = None, retry: Optional[Union[google.api_core.retry.retry_unary_async.AsyncRetry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.cloud.datalabeling_v1beta1.services.data_labeling_service.pagers.ListEvaluationJobsAsyncPager [source]¶
Lists all evaluation jobs within a project with possible filters. Pagination is supported.
# This snippet has been automatically generated and should be regarded as a # code template only. # It will require modifications to work: # - It may require correct/in-range values for request initialization. # - It may require specifying regional endpoints when creating the service # client as shown in: # https://googleapis.dev/python/google-api-core/latest/client_options.html from google.cloud import datalabeling_v1beta1 async def sample_list_evaluation_jobs(): # Create a client client = datalabeling_v1beta1.DataLabelingServiceAsyncClient() # Initialize request argument(s) request = datalabeling_v1beta1.ListEvaluationJobsRequest( parent="parent_value", ) # Make the request page_result = client.list_evaluation_jobs(request=request) # Handle the response async for response in page_result: print(response)
- Parameters
request (Optional[Union[google.cloud.datalabeling_v1beta1.types.ListEvaluationJobsRequest, dict]]) – The request object. Request message for ListEvaluationJobs.
parent (
str
) –Required. Evaluation job resource parent. Format: “projects/{project_id}”
This corresponds to the
parent
field on therequest
instance; ifrequest
is provided, this should not be set.filter (
str
) –Optional. You can filter the jobs to list by model_id (also known as model_name, as described in [EvaluationJob.modelVersion][google.cloud.datalabeling.v1beta1.EvaluationJob.model_version]) or by evaluation job state (as described in [EvaluationJob.state][google.cloud.datalabeling.v1beta1.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}”This corresponds to the
filter
field on therequest
instance; ifrequest
is provided, this should not be set.retry (google.api_core.retry_async.AsyncRetry) – Designation of what errors, if any, should be retried.
timeout (float) – The timeout for this request.
metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.
- Returns
Results for listing evaluation jobs.
Iterating over this object will yield results and resolve additional pages automatically.
- Return type
google.cloud.datalabeling_v1beta1.services.data_labeling_service.pagers.ListEvaluationJobsAsyncPager
- async list_examples(request: Optional[Union[google.cloud.datalabeling_v1beta1.types.data_labeling_service.ListExamplesRequest, dict]] = None, *, parent: Optional[str] = None, filter: Optional[str] = None, retry: Optional[Union[google.api_core.retry.retry_unary_async.AsyncRetry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.cloud.datalabeling_v1beta1.services.data_labeling_service.pagers.ListExamplesAsyncPager [source]¶
Lists examples in an annotated dataset. Pagination is supported.
# This snippet has been automatically generated and should be regarded as a # code template only. # It will require modifications to work: # - It may require correct/in-range values for request initialization. # - It may require specifying regional endpoints when creating the service # client as shown in: # https://googleapis.dev/python/google-api-core/latest/client_options.html from google.cloud import datalabeling_v1beta1 async def sample_list_examples(): # Create a client client = datalabeling_v1beta1.DataLabelingServiceAsyncClient() # Initialize request argument(s) request = datalabeling_v1beta1.ListExamplesRequest( parent="parent_value", ) # Make the request page_result = client.list_examples(request=request) # Handle the response async for response in page_result: print(response)
- Parameters
request (Optional[Union[google.cloud.datalabeling_v1beta1.types.ListExamplesRequest, dict]]) – The request object. Request message for ListExamples.
parent (
str
) – Required. Example resource parent. This corresponds to theparent
field on therequest
instance; ifrequest
is provided, this should not be set.filter (
str
) –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}”
This corresponds to the
filter
field on therequest
instance; ifrequest
is provided, this should not be set.retry (google.api_core.retry_async.AsyncRetry) – Designation of what errors, if any, should be retried.
timeout (float) – The timeout for this request.
metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.
- Returns
Results of listing Examples in and annotated dataset. Iterating over this object will yield results and resolve additional pages automatically.
- Return type
google.cloud.datalabeling_v1beta1.services.data_labeling_service.pagers.ListExamplesAsyncPager
- async list_instructions(request: Optional[Union[google.cloud.datalabeling_v1beta1.types.data_labeling_service.ListInstructionsRequest, dict]] = None, *, parent: Optional[str] = None, filter: Optional[str] = None, retry: Optional[Union[google.api_core.retry.retry_unary_async.AsyncRetry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.cloud.datalabeling_v1beta1.services.data_labeling_service.pagers.ListInstructionsAsyncPager [source]¶
Lists instructions for a project. Pagination is supported.
# This snippet has been automatically generated and should be regarded as a # code template only. # It will require modifications to work: # - It may require correct/in-range values for request initialization. # - It may require specifying regional endpoints when creating the service # client as shown in: # https://googleapis.dev/python/google-api-core/latest/client_options.html from google.cloud import datalabeling_v1beta1 async def sample_list_instructions(): # Create a client client = datalabeling_v1beta1.DataLabelingServiceAsyncClient() # Initialize request argument(s) request = datalabeling_v1beta1.ListInstructionsRequest( parent="parent_value", ) # Make the request page_result = client.list_instructions(request=request) # Handle the response async for response in page_result: print(response)
- Parameters
request (Optional[Union[google.cloud.datalabeling_v1beta1.types.ListInstructionsRequest, dict]]) – The request object. Request message for ListInstructions.
parent (
str
) –Required. Instruction resource parent, format: projects/{project_id}
This corresponds to the
parent
field on therequest
instance; ifrequest
is provided, this should not be set.filter (
str
) –Optional. Filter is not supported at this moment.
This corresponds to the
filter
field on therequest
instance; ifrequest
is provided, this should not be set.retry (google.api_core.retry_async.AsyncRetry) – Designation of what errors, if any, should be retried.
timeout (float) – The timeout for this request.
metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.
- Returns
Results of listing instructions under a project. Iterating over this object will yield results and resolve additional pages automatically.
- Return type
google.cloud.datalabeling_v1beta1.services.data_labeling_service.pagers.ListInstructionsAsyncPager
- static parse_annotated_dataset_path(path: str) Dict[str, str] ¶
Parses a annotated_dataset path into its component segments.
- static parse_annotation_spec_set_path(path: str) Dict[str, str] ¶
Parses a annotation_spec_set path into its component segments.
- static parse_common_billing_account_path(path: str) Dict[str, str] ¶
Parse a billing_account path into its component segments.
- static parse_common_folder_path(path: str) Dict[str, str] ¶
Parse a folder path into its component segments.
- static parse_common_location_path(path: str) Dict[str, str] ¶
Parse a location path into its component segments.
- static parse_common_organization_path(path: str) Dict[str, str] ¶
Parse a organization path into its component segments.
- static parse_common_project_path(path: str) Dict[str, str] ¶
Parse a project path into its component segments.
- static parse_data_item_path(path: str) Dict[str, str] ¶
Parses a data_item path into its component segments.
- static parse_dataset_path(path: str) Dict[str, str] ¶
Parses a dataset path into its component segments.
- static parse_evaluation_job_path(path: str) Dict[str, str] ¶
Parses a evaluation_job path into its component segments.
- static parse_evaluation_path(path: str) Dict[str, str] ¶
Parses a evaluation path into its component segments.
- static parse_example_path(path: str) Dict[str, str] ¶
Parses a example path into its component segments.
- static parse_instruction_path(path: str) Dict[str, str] ¶
Parses a instruction path into its component segments.
- async pause_evaluation_job(request: Optional[Union[google.cloud.datalabeling_v1beta1.types.data_labeling_service.PauseEvaluationJobRequest, dict]] = None, *, name: Optional[str] = None, retry: Optional[Union[google.api_core.retry.retry_unary_async.AsyncRetry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) None [source]¶
Pauses an evaluation job. Pausing an evaluation job that is already in a
PAUSED
state is a no-op.# This snippet has been automatically generated and should be regarded as a # code template only. # It will require modifications to work: # - It may require correct/in-range values for request initialization. # - It may require specifying regional endpoints when creating the service # client as shown in: # https://googleapis.dev/python/google-api-core/latest/client_options.html from google.cloud import datalabeling_v1beta1 async def sample_pause_evaluation_job(): # Create a client client = datalabeling_v1beta1.DataLabelingServiceAsyncClient() # Initialize request argument(s) request = datalabeling_v1beta1.PauseEvaluationJobRequest( name="name_value", ) # Make the request await client.pause_evaluation_job(request=request)
- Parameters
request (Optional[Union[google.cloud.datalabeling_v1beta1.types.PauseEvaluationJobRequest, dict]]) – The request object. Request message for PauseEvaluationJob.
name (
str
) –Required. Name of the evaluation job that is going to be paused. Format:
”projects/{project_id}/evaluationJobs/{evaluation_job_id}”
This corresponds to the
name
field on therequest
instance; ifrequest
is provided, this should not be set.retry (google.api_core.retry_async.AsyncRetry) – Designation of what errors, if any, should be retried.
timeout (float) – The timeout for this request.
metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.
- async resume_evaluation_job(request: Optional[Union[google.cloud.datalabeling_v1beta1.types.data_labeling_service.ResumeEvaluationJobRequest, dict]] = None, *, name: Optional[str] = None, retry: Optional[Union[google.api_core.retry.retry_unary_async.AsyncRetry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) None [source]¶
Resumes a paused evaluation job. A deleted evaluation job can’t be resumed. Resuming a running or scheduled evaluation job is a no-op.
# This snippet has been automatically generated and should be regarded as a # code template only. # It will require modifications to work: # - It may require correct/in-range values for request initialization. # - It may require specifying regional endpoints when creating the service # client as shown in: # https://googleapis.dev/python/google-api-core/latest/client_options.html from google.cloud import datalabeling_v1beta1 async def sample_resume_evaluation_job(): # Create a client client = datalabeling_v1beta1.DataLabelingServiceAsyncClient() # Initialize request argument(s) request = datalabeling_v1beta1.ResumeEvaluationJobRequest( name="name_value", ) # Make the request await client.resume_evaluation_job(request=request)
- Parameters
request (Optional[Union[google.cloud.datalabeling_v1beta1.types.ResumeEvaluationJobRequest, dict]]) – The request object. Request message ResumeEvaluationJob.
name (
str
) –Required. Name of the evaluation job that is going to be resumed. Format:
”projects/{project_id}/evaluationJobs/{evaluation_job_id}”
This corresponds to the
name
field on therequest
instance; ifrequest
is provided, this should not be set.retry (google.api_core.retry_async.AsyncRetry) – Designation of what errors, if any, should be retried.
timeout (float) – The timeout for this request.
metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.
- async search_evaluations(request: Optional[Union[google.cloud.datalabeling_v1beta1.types.data_labeling_service.SearchEvaluationsRequest, dict]] = None, *, parent: Optional[str] = None, filter: Optional[str] = None, retry: Optional[Union[google.api_core.retry.retry_unary_async.AsyncRetry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.cloud.datalabeling_v1beta1.services.data_labeling_service.pagers.SearchEvaluationsAsyncPager [source]¶
Searches [evaluations][google.cloud.datalabeling.v1beta1.Evaluation] within a project.
# This snippet has been automatically generated and should be regarded as a # code template only. # It will require modifications to work: # - It may require correct/in-range values for request initialization. # - It may require specifying regional endpoints when creating the service # client as shown in: # https://googleapis.dev/python/google-api-core/latest/client_options.html from google.cloud import datalabeling_v1beta1 async def sample_search_evaluations(): # Create a client client = datalabeling_v1beta1.DataLabelingServiceAsyncClient() # Initialize request argument(s) request = datalabeling_v1beta1.SearchEvaluationsRequest( parent="parent_value", ) # Make the request page_result = client.search_evaluations(request=request) # Handle the response async for response in page_result: print(response)
- Parameters
request (Optional[Union[google.cloud.datalabeling_v1beta1.types.SearchEvaluationsRequest, dict]]) – The request object. Request message for SearchEvaluation.
parent (
str
) –Required. Evaluation search parent (project ID). Format: “projects/{project_id}”
This corresponds to the
parent
field on therequest
instance; ifrequest
is provided, this should not be set.filter (
str
) –Optional. To search evaluations, you can filter by the following:
evaluation_job.evaluation_job_id (the last part of [EvaluationJob.name][google.cloud.datalabeling.v1beta1.EvaluationJob.name])
evaluation_job.model_id (the {model_name} portion of [EvaluationJob.modelVersion][google.cloud.datalabeling.v1beta1.EvaluationJob.model_version])
evaluation_job.evaluation_job_run_time_start (Minimum threshold for the [evaluationJobRunTime][google.cloud.datalabeling.v1beta1.Evaluation.evaluation_job_run_time] that created the evaluation)
evaluation_job.evaluation_job_run_time_end (Maximum threshold for the [evaluationJobRunTime][google.cloud.datalabeling.v1beta1.Evaluation.evaluation_job_run_time] that created the evaluation)
evaluation_job.job_state ([EvaluationJob.state][google.cloud.datalabeling.v1beta1.EvaluationJob.state])
annotation_spec.display_name (the Evaluation contains a metric for the annotation spec with this [displayName][google.cloud.datalabeling.v1beta1.AnnotationSpec.display_name])
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}”
This corresponds to the
filter
field on therequest
instance; ifrequest
is provided, this should not be set.retry (google.api_core.retry_async.AsyncRetry) – Designation of what errors, if any, should be retried.
timeout (float) – The timeout for this request.
metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.
- Returns
Results of searching evaluations.
Iterating over this object will yield results and resolve additional pages automatically.
- Return type
google.cloud.datalabeling_v1beta1.services.data_labeling_service.pagers.SearchEvaluationsAsyncPager
- async search_example_comparisons(request: Optional[Union[google.cloud.datalabeling_v1beta1.types.data_labeling_service.SearchExampleComparisonsRequest, dict]] = None, *, parent: Optional[str] = None, retry: Optional[Union[google.api_core.retry.retry_unary_async.AsyncRetry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.cloud.datalabeling_v1beta1.services.data_labeling_service.pagers.SearchExampleComparisonsAsyncPager [source]¶
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.
# This snippet has been automatically generated and should be regarded as a # code template only. # It will require modifications to work: # - It may require correct/in-range values for request initialization. # - It may require specifying regional endpoints when creating the service # client as shown in: # https://googleapis.dev/python/google-api-core/latest/client_options.html from google.cloud import datalabeling_v1beta1 async def sample_search_example_comparisons(): # Create a client client = datalabeling_v1beta1.DataLabelingServiceAsyncClient() # Initialize request argument(s) request = datalabeling_v1beta1.SearchExampleComparisonsRequest( parent="parent_value", ) # Make the request page_result = client.search_example_comparisons(request=request) # Handle the response async for response in page_result: print(response)
- Parameters
request (Optional[Union[google.cloud.datalabeling_v1beta1.types.SearchExampleComparisonsRequest, dict]]) – The request object. Request message of SearchExampleComparisons.
parent (
str
) –Required. Name of the [Evaluation][google.cloud.datalabeling.v1beta1.Evaluation] resource to search for example comparisons from. Format:
”projects/{project_id}/datasets/{dataset_id}/evaluations/{evaluation_id}”
This corresponds to the
parent
field on therequest
instance; ifrequest
is provided, this should not be set.retry (google.api_core.retry_async.AsyncRetry) – Designation of what errors, if any, should be retried.
timeout (float) – The timeout for this request.
metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.
- Returns
Results of searching example comparisons. Iterating over this object will yield results and resolve additional pages automatically.
- Return type
- property transport: google.cloud.datalabeling_v1beta1.services.data_labeling_service.transports.base.DataLabelingServiceTransport¶
Returns the transport used by the client instance.
- Returns
The transport used by the client instance.
- Return type
DataLabelingServiceTransport
- property universe_domain: str¶
Return the universe domain used by the client instance.
- Returns
- The universe domain used
by the client instance.
- Return type
- async update_evaluation_job(request: Optional[Union[google.cloud.datalabeling_v1beta1.types.data_labeling_service.UpdateEvaluationJobRequest, dict]] = None, *, evaluation_job: Optional[google.cloud.datalabeling_v1beta1.types.evaluation_job.EvaluationJob] = None, update_mask: Optional[google.protobuf.field_mask_pb2.FieldMask] = None, retry: Optional[Union[google.api_core.retry.retry_unary_async.AsyncRetry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.cloud.datalabeling_v1beta1.types.evaluation_job.EvaluationJob [source]¶
Updates an evaluation job. You can only update certain fields of the job’s [EvaluationJobConfig][google.cloud.datalabeling.v1beta1.EvaluationJobConfig]:
humanAnnotationConfig.instruction
,exampleCount
, andexampleSamplePercentage
.If you want to change any other aspect of the evaluation job, you must delete the job and create a new one.
# This snippet has been automatically generated and should be regarded as a # code template only. # It will require modifications to work: # - It may require correct/in-range values for request initialization. # - It may require specifying regional endpoints when creating the service # client as shown in: # https://googleapis.dev/python/google-api-core/latest/client_options.html from google.cloud import datalabeling_v1beta1 async def sample_update_evaluation_job(): # Create a client client = datalabeling_v1beta1.DataLabelingServiceAsyncClient() # Initialize request argument(s) request = datalabeling_v1beta1.UpdateEvaluationJobRequest( ) # Make the request response = await client.update_evaluation_job(request=request) # Handle the response print(response)
- Parameters
request (Optional[Union[google.cloud.datalabeling_v1beta1.types.UpdateEvaluationJobRequest, dict]]) – The request object. Request message for UpdateEvaluationJob.
evaluation_job (
google.cloud.datalabeling_v1beta1.types.EvaluationJob
) –Required. Evaluation job that is going to be updated.
This corresponds to the
evaluation_job
field on therequest
instance; ifrequest
is provided, this should not be set.update_mask (
google.protobuf.field_mask_pb2.FieldMask
) –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.
This corresponds to the
update_mask
field on therequest
instance; ifrequest
is provided, this should not be set.retry (google.api_core.retry_async.AsyncRetry) – Designation of what errors, if any, should be retried.
timeout (float) – The timeout for this request.
metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.
- Returns
- Defines an evaluation job that runs periodically to generate
[Evaluations][google.cloud.datalabeling.v1beta1.Evaluation]. [Creating an evaluation job](/ml-engine/docs/continuous-evaluation/create-job) is the starting point for using continuous evaluation.
- Return type
- class google.cloud.datalabeling_v1beta1.services.data_labeling_service.DataLabelingServiceClient(*, credentials: typing.Optional[google.auth.credentials.Credentials] = None, transport: typing.Optional[typing.Union[str, google.cloud.datalabeling_v1beta1.services.data_labeling_service.transports.base.DataLabelingServiceTransport, typing.Callable[[...], google.cloud.datalabeling_v1beta1.services.data_labeling_service.transports.base.DataLabelingServiceTransport]]] = None, client_options: typing.Optional[typing.Union[google.api_core.client_options.ClientOptions, dict]] = None, client_info: google.api_core.gapic_v1.client_info.ClientInfo = <google.api_core.gapic_v1.client_info.ClientInfo object>)[source]¶
Service for the AI Platform Data Labeling API.
Instantiates the data labeling service client.
- Parameters
credentials (Optional[google.auth.credentials.Credentials]) – The authorization credentials to attach to requests. These credentials identify the application to the service; if none are specified, the client will attempt to ascertain the credentials from the environment.
transport (Optional[Union[str,DataLabelingServiceTransport,Callable[..., DataLabelingServiceTransport]]]) – The transport to use, or a Callable that constructs and returns a new transport. If a Callable is given, it will be called with the same set of initialization arguments as used in the DataLabelingServiceTransport constructor. If set to None, a transport is chosen automatically.
client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]) –
Custom options for the client.
1. The
api_endpoint
property can be used to override the default endpoint provided by the client whentransport
is not explicitly provided. Only if this property is not set andtransport
was not explicitly provided, the endpoint is determined by the GOOGLE_API_USE_MTLS_ENDPOINT environment variable, which have one of the following values: “always” (always use the default mTLS endpoint), “never” (always use the default regular endpoint) and “auto” (auto-switch to the default mTLS endpoint if client certificate is present; this is the default value).2. If the GOOGLE_API_USE_CLIENT_CERTIFICATE environment variable is “true”, then the
client_cert_source
property can be used to provide a client certificate for mTLS transport. If not provided, the default SSL client certificate will be used if present. If GOOGLE_API_USE_CLIENT_CERTIFICATE is “false” or not set, no client certificate will be used.3. The
universe_domain
property can be used to override the default “googleapis.com” universe. Note that theapi_endpoint
property still takes precedence; anduniverse_domain
is currently not supported for mTLS.client_info (google.api_core.gapic_v1.client_info.ClientInfo) – The client info used to send a user-agent string along with API requests. If
None
, then default info will be used. Generally, you only need to set this if you’re developing your own client library.
- Raises
google.auth.exceptions.MutualTLSChannelError – If mutual TLS transport creation failed for any reason.
- __exit__(type, value, traceback)[source]¶
Releases underlying transport’s resources.
Warning
ONLY use as a context manager if the transport is NOT shared with other clients! Exiting the with block will CLOSE the transport and may cause errors in other clients!
- static annotated_dataset_path(project: str, dataset: str, annotated_dataset: str) str [source]¶
Returns a fully-qualified annotated_dataset string.
- static annotation_spec_set_path(project: str, annotation_spec_set: str) str [source]¶
Returns a fully-qualified annotation_spec_set string.
- property api_endpoint¶
Return the API endpoint used by the client instance.
- Returns
The API endpoint used by the client instance.
- Return type
- static common_billing_account_path(billing_account: str) str [source]¶
Returns a fully-qualified billing_account string.
- static common_location_path(project: str, location: str) str [source]¶
Returns a fully-qualified location string.
- static common_organization_path(organization: str) str [source]¶
Returns a fully-qualified organization string.
- create_annotation_spec_set(request: Optional[Union[google.cloud.datalabeling_v1beta1.types.data_labeling_service.CreateAnnotationSpecSetRequest, dict]] = None, *, parent: Optional[str] = None, annotation_spec_set: Optional[google.cloud.datalabeling_v1beta1.types.annotation_spec_set.AnnotationSpecSet] = None, retry: Optional[Union[google.api_core.retry.retry_unary.Retry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.cloud.datalabeling_v1beta1.types.annotation_spec_set.AnnotationSpecSet [source]¶
Creates an annotation spec set by providing a set of labels.
# This snippet has been automatically generated and should be regarded as a # code template only. # It will require modifications to work: # - It may require correct/in-range values for request initialization. # - It may require specifying regional endpoints when creating the service # client as shown in: # https://googleapis.dev/python/google-api-core/latest/client_options.html from google.cloud import datalabeling_v1beta1 def sample_create_annotation_spec_set(): # Create a client client = datalabeling_v1beta1.DataLabelingServiceClient() # Initialize request argument(s) request = datalabeling_v1beta1.CreateAnnotationSpecSetRequest( parent="parent_value", ) # Make the request response = client.create_annotation_spec_set(request=request) # Handle the response print(response)
- Parameters
request (Union[google.cloud.datalabeling_v1beta1.types.CreateAnnotationSpecSetRequest, dict]) – The request object. Request message for CreateAnnotationSpecSet.
parent (str) –
Required. AnnotationSpecSet resource parent, format: projects/{project_id}
This corresponds to the
parent
field on therequest
instance; ifrequest
is provided, this should not be set.annotation_spec_set (google.cloud.datalabeling_v1beta1.types.AnnotationSpecSet) –
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.
This corresponds to the
annotation_spec_set
field on therequest
instance; ifrequest
is provided, this should not be set.retry (google.api_core.retry.Retry) – Designation of what errors, if any, should be retried.
timeout (float) – The timeout for this request.
metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.
- Returns
An AnnotationSpecSet is a collection of label definitions. For example, in image classification tasks, you define a set of possible labels for images as an AnnotationSpecSet. An AnnotationSpecSet is immutable upon creation.
- Return type
- create_dataset(request: Optional[Union[google.cloud.datalabeling_v1beta1.types.data_labeling_service.CreateDatasetRequest, dict]] = None, *, parent: Optional[str] = None, dataset: Optional[google.cloud.datalabeling_v1beta1.types.dataset.Dataset] = None, retry: Optional[Union[google.api_core.retry.retry_unary.Retry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.cloud.datalabeling_v1beta1.types.dataset.Dataset [source]¶
Creates dataset. If success return a Dataset resource.
# This snippet has been automatically generated and should be regarded as a # code template only. # It will require modifications to work: # - It may require correct/in-range values for request initialization. # - It may require specifying regional endpoints when creating the service # client as shown in: # https://googleapis.dev/python/google-api-core/latest/client_options.html from google.cloud import datalabeling_v1beta1 def sample_create_dataset(): # Create a client client = datalabeling_v1beta1.DataLabelingServiceClient() # Initialize request argument(s) request = datalabeling_v1beta1.CreateDatasetRequest( parent="parent_value", ) # Make the request response = client.create_dataset(request=request) # Handle the response print(response)
- Parameters
request (Union[google.cloud.datalabeling_v1beta1.types.CreateDatasetRequest, dict]) – The request object. Request message for CreateDataset.
parent (str) –
Required. Dataset resource parent, format: projects/{project_id}
This corresponds to the
parent
field on therequest
instance; ifrequest
is provided, this should not be set.dataset (google.cloud.datalabeling_v1beta1.types.Dataset) – Required. The dataset to be created. This corresponds to the
dataset
field on therequest
instance; ifrequest
is provided, this should not be set.retry (google.api_core.retry.Retry) – Designation of what errors, if any, should be retried.
timeout (float) – The timeout for this request.
metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.
- Returns
Dataset is the resource to hold your data. You can request multiple labeling tasks for a dataset while each one will generate an AnnotatedDataset.
- Return type
- create_evaluation_job(request: Optional[Union[google.cloud.datalabeling_v1beta1.types.data_labeling_service.CreateEvaluationJobRequest, dict]] = None, *, parent: Optional[str] = None, job: Optional[google.cloud.datalabeling_v1beta1.types.evaluation_job.EvaluationJob] = None, retry: Optional[Union[google.api_core.retry.retry_unary.Retry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.cloud.datalabeling_v1beta1.types.evaluation_job.EvaluationJob [source]¶
Creates an evaluation job.
# This snippet has been automatically generated and should be regarded as a # code template only. # It will require modifications to work: # - It may require correct/in-range values for request initialization. # - It may require specifying regional endpoints when creating the service # client as shown in: # https://googleapis.dev/python/google-api-core/latest/client_options.html from google.cloud import datalabeling_v1beta1 def sample_create_evaluation_job(): # Create a client client = datalabeling_v1beta1.DataLabelingServiceClient() # Initialize request argument(s) request = datalabeling_v1beta1.CreateEvaluationJobRequest( parent="parent_value", ) # Make the request response = client.create_evaluation_job(request=request) # Handle the response print(response)
- Parameters
request (Union[google.cloud.datalabeling_v1beta1.types.CreateEvaluationJobRequest, dict]) – The request object. Request message for CreateEvaluationJob.
parent (str) –
Required. Evaluation job resource parent. Format: “projects/{project_id}”
This corresponds to the
parent
field on therequest
instance; ifrequest
is provided, this should not be set.job (google.cloud.datalabeling_v1beta1.types.EvaluationJob) –
Required. The evaluation job to create.
This corresponds to the
job
field on therequest
instance; ifrequest
is provided, this should not be set.retry (google.api_core.retry.Retry) – Designation of what errors, if any, should be retried.
timeout (float) – The timeout for this request.
metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.
- Returns
- Defines an evaluation job that runs periodically to generate
[Evaluations][google.cloud.datalabeling.v1beta1.Evaluation]. [Creating an evaluation job](/ml-engine/docs/continuous-evaluation/create-job) is the starting point for using continuous evaluation.
- Return type
- create_instruction(request: Optional[Union[google.cloud.datalabeling_v1beta1.types.data_labeling_service.CreateInstructionRequest, dict]] = None, *, parent: Optional[str] = None, instruction: Optional[google.cloud.datalabeling_v1beta1.types.instruction.Instruction] = None, retry: Optional[Union[google.api_core.retry.retry_unary.Retry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.api_core.operation.Operation [source]¶
Creates an instruction for how data should be labeled.
# This snippet has been automatically generated and should be regarded as a # code template only. # It will require modifications to work: # - It may require correct/in-range values for request initialization. # - It may require specifying regional endpoints when creating the service # client as shown in: # https://googleapis.dev/python/google-api-core/latest/client_options.html from google.cloud import datalabeling_v1beta1 def sample_create_instruction(): # Create a client client = datalabeling_v1beta1.DataLabelingServiceClient() # Initialize request argument(s) request = datalabeling_v1beta1.CreateInstructionRequest( parent="parent_value", ) # Make the request operation = client.create_instruction(request=request) print("Waiting for operation to complete...") response = operation.result() # Handle the response print(response)
- Parameters
request (Union[google.cloud.datalabeling_v1beta1.types.CreateInstructionRequest, dict]) – The request object. Request message for CreateInstruction.
parent (str) –
Required. Instruction resource parent, format: projects/{project_id}
This corresponds to the
parent
field on therequest
instance; ifrequest
is provided, this should not be set.instruction (google.cloud.datalabeling_v1beta1.types.Instruction) –
Required. Instruction of how to perform the labeling task.
This corresponds to the
instruction
field on therequest
instance; ifrequest
is provided, this should not be set.retry (google.api_core.retry.Retry) – Designation of what errors, if any, should be retried.
timeout (float) – The timeout for this request.
metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.
- Returns
An object representing a long-running operation.
- The result type for the operation will be
google.cloud.datalabeling_v1beta1.types.Instruction
Instruction of how to perform the labeling task for human operators. Currently only PDF instruction is supported.
- The result type for the operation will be
- Return type
- static data_item_path(project: str, dataset: str, data_item: str) str [source]¶
Returns a fully-qualified data_item string.
- static dataset_path(project: str, dataset: str) str [source]¶
Returns a fully-qualified dataset string.
- delete_annotated_dataset(request: Optional[Union[google.cloud.datalabeling_v1beta1.types.data_labeling_service.DeleteAnnotatedDatasetRequest, dict]] = None, *, retry: Optional[Union[google.api_core.retry.retry_unary.Retry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) None [source]¶
Deletes an annotated dataset by resource name.
# This snippet has been automatically generated and should be regarded as a # code template only. # It will require modifications to work: # - It may require correct/in-range values for request initialization. # - It may require specifying regional endpoints when creating the service # client as shown in: # https://googleapis.dev/python/google-api-core/latest/client_options.html from google.cloud import datalabeling_v1beta1 def sample_delete_annotated_dataset(): # Create a client client = datalabeling_v1beta1.DataLabelingServiceClient() # Initialize request argument(s) request = datalabeling_v1beta1.DeleteAnnotatedDatasetRequest( name="name_value", ) # Make the request client.delete_annotated_dataset(request=request)
- Parameters
request (Union[google.cloud.datalabeling_v1beta1.types.DeleteAnnotatedDatasetRequest, dict]) – The request object. Request message for DeleteAnnotatedDataset.
retry (google.api_core.retry.Retry) – Designation of what errors, if any, should be retried.
timeout (float) – The timeout for this request.
metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.
- delete_annotation_spec_set(request: Optional[Union[google.cloud.datalabeling_v1beta1.types.data_labeling_service.DeleteAnnotationSpecSetRequest, dict]] = None, *, name: Optional[str] = None, retry: Optional[Union[google.api_core.retry.retry_unary.Retry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) None [source]¶
Deletes an annotation spec set by resource name.
# This snippet has been automatically generated and should be regarded as a # code template only. # It will require modifications to work: # - It may require correct/in-range values for request initialization. # - It may require specifying regional endpoints when creating the service # client as shown in: # https://googleapis.dev/python/google-api-core/latest/client_options.html from google.cloud import datalabeling_v1beta1 def sample_delete_annotation_spec_set(): # Create a client client = datalabeling_v1beta1.DataLabelingServiceClient() # Initialize request argument(s) request = datalabeling_v1beta1.DeleteAnnotationSpecSetRequest( name="name_value", ) # Make the request client.delete_annotation_spec_set(request=request)
- Parameters
request (Union[google.cloud.datalabeling_v1beta1.types.DeleteAnnotationSpecSetRequest, dict]) – The request object. Request message for DeleteAnnotationSpecSet.
name (str) –
Required. AnnotationSpec resource name, format:
projects/{project_id}/annotationSpecSets/{annotation_spec_set_id}
.This corresponds to the
name
field on therequest
instance; ifrequest
is provided, this should not be set.retry (google.api_core.retry.Retry) – Designation of what errors, if any, should be retried.
timeout (float) – The timeout for this request.
metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.
- delete_dataset(request: Optional[Union[google.cloud.datalabeling_v1beta1.types.data_labeling_service.DeleteDatasetRequest, dict]] = None, *, name: Optional[str] = None, retry: Optional[Union[google.api_core.retry.retry_unary.Retry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) None [source]¶
Deletes a dataset by resource name.
# This snippet has been automatically generated and should be regarded as a # code template only. # It will require modifications to work: # - It may require correct/in-range values for request initialization. # - It may require specifying regional endpoints when creating the service # client as shown in: # https://googleapis.dev/python/google-api-core/latest/client_options.html from google.cloud import datalabeling_v1beta1 def sample_delete_dataset(): # Create a client client = datalabeling_v1beta1.DataLabelingServiceClient() # Initialize request argument(s) request = datalabeling_v1beta1.DeleteDatasetRequest( name="name_value", ) # Make the request client.delete_dataset(request=request)
- Parameters
request (Union[google.cloud.datalabeling_v1beta1.types.DeleteDatasetRequest, dict]) – The request object. Request message for DeleteDataset.
name (str) –
Required. Dataset resource name, format: projects/{project_id}/datasets/{dataset_id}
This corresponds to the
name
field on therequest
instance; ifrequest
is provided, this should not be set.retry (google.api_core.retry.Retry) – Designation of what errors, if any, should be retried.
timeout (float) – The timeout for this request.
metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.
- delete_evaluation_job(request: Optional[Union[google.cloud.datalabeling_v1beta1.types.data_labeling_service.DeleteEvaluationJobRequest, dict]] = None, *, name: Optional[str] = None, retry: Optional[Union[google.api_core.retry.retry_unary.Retry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) None [source]¶
Stops and deletes an evaluation job.
# This snippet has been automatically generated and should be regarded as a # code template only. # It will require modifications to work: # - It may require correct/in-range values for request initialization. # - It may require specifying regional endpoints when creating the service # client as shown in: # https://googleapis.dev/python/google-api-core/latest/client_options.html from google.cloud import datalabeling_v1beta1 def sample_delete_evaluation_job(): # Create a client client = datalabeling_v1beta1.DataLabelingServiceClient() # Initialize request argument(s) request = datalabeling_v1beta1.DeleteEvaluationJobRequest( name="name_value", ) # Make the request client.delete_evaluation_job(request=request)
- Parameters
request (Union[google.cloud.datalabeling_v1beta1.types.DeleteEvaluationJobRequest, dict]) – The request object. Request message DeleteEvaluationJob.
name (str) –
Required. Name of the evaluation job that is going to be deleted. Format:
”projects/{project_id}/evaluationJobs/{evaluation_job_id}”
This corresponds to the
name
field on therequest
instance; ifrequest
is provided, this should not be set.retry (google.api_core.retry.Retry) – Designation of what errors, if any, should be retried.
timeout (float) – The timeout for this request.
metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.
- delete_instruction(request: Optional[Union[google.cloud.datalabeling_v1beta1.types.data_labeling_service.DeleteInstructionRequest, dict]] = None, *, name: Optional[str] = None, retry: Optional[Union[google.api_core.retry.retry_unary.Retry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) None [source]¶
Deletes an instruction object by resource name.
# This snippet has been automatically generated and should be regarded as a # code template only. # It will require modifications to work: # - It may require correct/in-range values for request initialization. # - It may require specifying regional endpoints when creating the service # client as shown in: # https://googleapis.dev/python/google-api-core/latest/client_options.html from google.cloud import datalabeling_v1beta1 def sample_delete_instruction(): # Create a client client = datalabeling_v1beta1.DataLabelingServiceClient() # Initialize request argument(s) request = datalabeling_v1beta1.DeleteInstructionRequest( name="name_value", ) # Make the request client.delete_instruction(request=request)
- Parameters
request (Union[google.cloud.datalabeling_v1beta1.types.DeleteInstructionRequest, dict]) – The request object. Request message for DeleteInstruction.
name (str) –
Required. Instruction resource name, format: projects/{project_id}/instructions/{instruction_id}
This corresponds to the
name
field on therequest
instance; ifrequest
is provided, this should not be set.retry (google.api_core.retry.Retry) – Designation of what errors, if any, should be retried.
timeout (float) – The timeout for this request.
metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.
- static evaluation_job_path(project: str, evaluation_job: str) str [source]¶
Returns a fully-qualified evaluation_job string.
- static evaluation_path(project: str, dataset: str, evaluation: str) str [source]¶
Returns a fully-qualified evaluation string.
- static example_path(project: str, dataset: str, annotated_dataset: str, example: str) str [source]¶
Returns a fully-qualified example string.
- export_data(request: Optional[Union[google.cloud.datalabeling_v1beta1.types.data_labeling_service.ExportDataRequest, dict]] = None, *, name: Optional[str] = None, annotated_dataset: Optional[str] = None, filter: Optional[str] = None, output_config: Optional[google.cloud.datalabeling_v1beta1.types.dataset.OutputConfig] = None, retry: Optional[Union[google.api_core.retry.retry_unary.Retry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.api_core.operation.Operation [source]¶
Exports data and annotations from dataset.
# This snippet has been automatically generated and should be regarded as a # code template only. # It will require modifications to work: # - It may require correct/in-range values for request initialization. # - It may require specifying regional endpoints when creating the service # client as shown in: # https://googleapis.dev/python/google-api-core/latest/client_options.html from google.cloud import datalabeling_v1beta1 def sample_export_data(): # Create a client client = datalabeling_v1beta1.DataLabelingServiceClient() # Initialize request argument(s) request = datalabeling_v1beta1.ExportDataRequest( name="name_value", annotated_dataset="annotated_dataset_value", ) # Make the request operation = client.export_data(request=request) print("Waiting for operation to complete...") response = operation.result() # Handle the response print(response)
- Parameters
request (Union[google.cloud.datalabeling_v1beta1.types.ExportDataRequest, dict]) – The request object. Request message for ExportData API.
name (str) –
Required. Dataset resource name, format: projects/{project_id}/datasets/{dataset_id}
This corresponds to the
name
field on therequest
instance; ifrequest
is provided, this should not be set.annotated_dataset (str) –
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}
This corresponds to the
annotated_dataset
field on therequest
instance; ifrequest
is provided, this should not be set.filter (str) –
Optional. Filter is not supported at this moment.
This corresponds to the
filter
field on therequest
instance; ifrequest
is provided, this should not be set.output_config (google.cloud.datalabeling_v1beta1.types.OutputConfig) –
Required. Specify the output destination.
This corresponds to the
output_config
field on therequest
instance; ifrequest
is provided, this should not be set.retry (google.api_core.retry.Retry) – Designation of what errors, if any, should be retried.
timeout (float) – The timeout for this request.
metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.
- Returns
An object representing a long-running operation.
The result type for the operation will be
google.cloud.datalabeling_v1beta1.types.ExportDataOperationResponse
Response used for ExportDataset longrunning operation.- Return type
- classmethod from_service_account_file(filename: str, *args, **kwargs)[source]¶
- Creates an instance of this client using the provided credentials
file.
- Parameters
filename (str) – The path to the service account private key json file.
args – Additional arguments to pass to the constructor.
kwargs – Additional arguments to pass to the constructor.
- Returns
The constructed client.
- Return type
- classmethod from_service_account_info(info: dict, *args, **kwargs)[source]¶
- Creates an instance of this client using the provided credentials
info.
- Parameters
info (dict) – The service account private key info.
args – Additional arguments to pass to the constructor.
kwargs – Additional arguments to pass to the constructor.
- Returns
The constructed client.
- Return type
- classmethod from_service_account_json(filename: str, *args, **kwargs)¶
- Creates an instance of this client using the provided credentials
file.
- Parameters
filename (str) – The path to the service account private key json file.
args – Additional arguments to pass to the constructor.
kwargs – Additional arguments to pass to the constructor.
- Returns
The constructed client.
- Return type
- get_annotated_dataset(request: Optional[Union[google.cloud.datalabeling_v1beta1.types.data_labeling_service.GetAnnotatedDatasetRequest, dict]] = None, *, name: Optional[str] = None, retry: Optional[Union[google.api_core.retry.retry_unary.Retry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.cloud.datalabeling_v1beta1.types.dataset.AnnotatedDataset [source]¶
Gets an annotated dataset by resource name.
# This snippet has been automatically generated and should be regarded as a # code template only. # It will require modifications to work: # - It may require correct/in-range values for request initialization. # - It may require specifying regional endpoints when creating the service # client as shown in: # https://googleapis.dev/python/google-api-core/latest/client_options.html from google.cloud import datalabeling_v1beta1 def sample_get_annotated_dataset(): # Create a client client = datalabeling_v1beta1.DataLabelingServiceClient() # Initialize request argument(s) request = datalabeling_v1beta1.GetAnnotatedDatasetRequest( name="name_value", ) # Make the request response = client.get_annotated_dataset(request=request) # Handle the response print(response)
- Parameters
request (Union[google.cloud.datalabeling_v1beta1.types.GetAnnotatedDatasetRequest, dict]) – The request object. Request message for GetAnnotatedDataset.
name (str) –
Required. Name of the annotated dataset to get, format: projects/{project_id}/datasets/{dataset_id}/annotatedDatasets/ {annotated_dataset_id}
This corresponds to the
name
field on therequest
instance; ifrequest
is provided, this should not be set.retry (google.api_core.retry.Retry) – Designation of what errors, if any, should be retried.
timeout (float) – The timeout for this request.
metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.
- Returns
AnnotatedDataset is a set holding annotations for data in a Dataset. Each labeling task will generate an AnnotatedDataset under the Dataset that the task is requested for.
- Return type
- get_annotation_spec_set(request: Optional[Union[google.cloud.datalabeling_v1beta1.types.data_labeling_service.GetAnnotationSpecSetRequest, dict]] = None, *, name: Optional[str] = None, retry: Optional[Union[google.api_core.retry.retry_unary.Retry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.cloud.datalabeling_v1beta1.types.annotation_spec_set.AnnotationSpecSet [source]¶
Gets an annotation spec set by resource name.
# This snippet has been automatically generated and should be regarded as a # code template only. # It will require modifications to work: # - It may require correct/in-range values for request initialization. # - It may require specifying regional endpoints when creating the service # client as shown in: # https://googleapis.dev/python/google-api-core/latest/client_options.html from google.cloud import datalabeling_v1beta1 def sample_get_annotation_spec_set(): # Create a client client = datalabeling_v1beta1.DataLabelingServiceClient() # Initialize request argument(s) request = datalabeling_v1beta1.GetAnnotationSpecSetRequest( name="name_value", ) # Make the request response = client.get_annotation_spec_set(request=request) # Handle the response print(response)
- Parameters
request (Union[google.cloud.datalabeling_v1beta1.types.GetAnnotationSpecSetRequest, dict]) – The request object. Request message for GetAnnotationSpecSet.
name (str) –
Required. AnnotationSpecSet resource name, format: projects/{project_id}/annotationSpecSets/{annotation_spec_set_id}
This corresponds to the
name
field on therequest
instance; ifrequest
is provided, this should not be set.retry (google.api_core.retry.Retry) – Designation of what errors, if any, should be retried.
timeout (float) – The timeout for this request.
metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.
- Returns
An AnnotationSpecSet is a collection of label definitions. For example, in image classification tasks, you define a set of possible labels for images as an AnnotationSpecSet. An AnnotationSpecSet is immutable upon creation.
- Return type
- get_data_item(request: Optional[Union[google.cloud.datalabeling_v1beta1.types.data_labeling_service.GetDataItemRequest, dict]] = None, *, name: Optional[str] = None, retry: Optional[Union[google.api_core.retry.retry_unary.Retry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.cloud.datalabeling_v1beta1.types.dataset.DataItem [source]¶
Gets a data item in a dataset by resource name. This API can be called after data are imported into dataset.
# This snippet has been automatically generated and should be regarded as a # code template only. # It will require modifications to work: # - It may require correct/in-range values for request initialization. # - It may require specifying regional endpoints when creating the service # client as shown in: # https://googleapis.dev/python/google-api-core/latest/client_options.html from google.cloud import datalabeling_v1beta1 def sample_get_data_item(): # Create a client client = datalabeling_v1beta1.DataLabelingServiceClient() # Initialize request argument(s) request = datalabeling_v1beta1.GetDataItemRequest( name="name_value", ) # Make the request response = client.get_data_item(request=request) # Handle the response print(response)
- Parameters
request (Union[google.cloud.datalabeling_v1beta1.types.GetDataItemRequest, dict]) – The request object. Request message for GetDataItem.
name (str) –
Required. The name of the data item to get, format: projects/{project_id}/datasets/{dataset_id}/dataItems/{data_item_id}
This corresponds to the
name
field on therequest
instance; ifrequest
is provided, this should not be set.retry (google.api_core.retry.Retry) – Designation of what errors, if any, should be retried.
timeout (float) – The timeout for this request.
metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.
- Returns
DataItem is a piece of data, without annotation. For example, an image.
- Return type
- get_dataset(request: Optional[Union[google.cloud.datalabeling_v1beta1.types.data_labeling_service.GetDatasetRequest, dict]] = None, *, name: Optional[str] = None, retry: Optional[Union[google.api_core.retry.retry_unary.Retry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.cloud.datalabeling_v1beta1.types.dataset.Dataset [source]¶
Gets dataset by resource name.
# This snippet has been automatically generated and should be regarded as a # code template only. # It will require modifications to work: # - It may require correct/in-range values for request initialization. # - It may require specifying regional endpoints when creating the service # client as shown in: # https://googleapis.dev/python/google-api-core/latest/client_options.html from google.cloud import datalabeling_v1beta1 def sample_get_dataset(): # Create a client client = datalabeling_v1beta1.DataLabelingServiceClient() # Initialize request argument(s) request = datalabeling_v1beta1.GetDatasetRequest( name="name_value", ) # Make the request response = client.get_dataset(request=request) # Handle the response print(response)
- Parameters
request (Union[google.cloud.datalabeling_v1beta1.types.GetDatasetRequest, dict]) – The request object. Request message for GetDataSet.
name (str) –
Required. Dataset resource name, format: projects/{project_id}/datasets/{dataset_id}
This corresponds to the
name
field on therequest
instance; ifrequest
is provided, this should not be set.retry (google.api_core.retry.Retry) – Designation of what errors, if any, should be retried.
timeout (float) – The timeout for this request.
metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.
- Returns
Dataset is the resource to hold your data. You can request multiple labeling tasks for a dataset while each one will generate an AnnotatedDataset.
- Return type
- get_evaluation(request: Optional[Union[google.cloud.datalabeling_v1beta1.types.data_labeling_service.GetEvaluationRequest, dict]] = None, *, name: Optional[str] = None, retry: Optional[Union[google.api_core.retry.retry_unary.Retry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.cloud.datalabeling_v1beta1.types.evaluation.Evaluation [source]¶
Gets an evaluation by resource name (to search, use [projects.evaluations.search][google.cloud.datalabeling.v1beta1.DataLabelingService.SearchEvaluations]).
# This snippet has been automatically generated and should be regarded as a # code template only. # It will require modifications to work: # - It may require correct/in-range values for request initialization. # - It may require specifying regional endpoints when creating the service # client as shown in: # https://googleapis.dev/python/google-api-core/latest/client_options.html from google.cloud import datalabeling_v1beta1 def sample_get_evaluation(): # Create a client client = datalabeling_v1beta1.DataLabelingServiceClient() # Initialize request argument(s) request = datalabeling_v1beta1.GetEvaluationRequest( name="name_value", ) # Make the request response = client.get_evaluation(request=request) # Handle the response print(response)
- Parameters
request (Union[google.cloud.datalabeling_v1beta1.types.GetEvaluationRequest, dict]) – The request object. Request message for GetEvaluation.
name (str) –
Required. Name of the evaluation. Format:
”projects/{project_id}/datasets/{dataset_id}/evaluations/{evaluation_id}’
This corresponds to the
name
field on therequest
instance; ifrequest
is provided, this should not be set.retry (google.api_core.retry.Retry) – Designation of what errors, if any, should be retried.
timeout (float) – The timeout for this request.
metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.
- Returns
- Describes an evaluation between a machine learning model’s predictions and
ground truth labels. Created when an [EvaluationJob][google.cloud.datalabeling.v1beta1.EvaluationJob] runs successfully.
- Return type
- get_evaluation_job(request: Optional[Union[google.cloud.datalabeling_v1beta1.types.data_labeling_service.GetEvaluationJobRequest, dict]] = None, *, name: Optional[str] = None, retry: Optional[Union[google.api_core.retry.retry_unary.Retry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.cloud.datalabeling_v1beta1.types.evaluation_job.EvaluationJob [source]¶
Gets an evaluation job by resource name.
# This snippet has been automatically generated and should be regarded as a # code template only. # It will require modifications to work: # - It may require correct/in-range values for request initialization. # - It may require specifying regional endpoints when creating the service # client as shown in: # https://googleapis.dev/python/google-api-core/latest/client_options.html from google.cloud import datalabeling_v1beta1 def sample_get_evaluation_job(): # Create a client client = datalabeling_v1beta1.DataLabelingServiceClient() # Initialize request argument(s) request = datalabeling_v1beta1.GetEvaluationJobRequest( name="name_value", ) # Make the request response = client.get_evaluation_job(request=request) # Handle the response print(response)
- Parameters
request (Union[google.cloud.datalabeling_v1beta1.types.GetEvaluationJobRequest, dict]) – The request object. Request message for GetEvaluationJob.
name (str) –
Required. Name of the evaluation job. Format:
”projects/{project_id}/evaluationJobs/{evaluation_job_id}”
This corresponds to the
name
field on therequest
instance; ifrequest
is provided, this should not be set.retry (google.api_core.retry.Retry) – Designation of what errors, if any, should be retried.
timeout (float) – The timeout for this request.
metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.
- Returns
- Defines an evaluation job that runs periodically to generate
[Evaluations][google.cloud.datalabeling.v1beta1.Evaluation]. [Creating an evaluation job](/ml-engine/docs/continuous-evaluation/create-job) is the starting point for using continuous evaluation.
- Return type
- get_example(request: Optional[Union[google.cloud.datalabeling_v1beta1.types.data_labeling_service.GetExampleRequest, dict]] = None, *, name: Optional[str] = None, filter: Optional[str] = None, retry: Optional[Union[google.api_core.retry.retry_unary.Retry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.cloud.datalabeling_v1beta1.types.dataset.Example [source]¶
Gets an example by resource name, including both data and annotation.
# This snippet has been automatically generated and should be regarded as a # code template only. # It will require modifications to work: # - It may require correct/in-range values for request initialization. # - It may require specifying regional endpoints when creating the service # client as shown in: # https://googleapis.dev/python/google-api-core/latest/client_options.html from google.cloud import datalabeling_v1beta1 def sample_get_example(): # Create a client client = datalabeling_v1beta1.DataLabelingServiceClient() # Initialize request argument(s) request = datalabeling_v1beta1.GetExampleRequest( name="name_value", ) # Make the request response = client.get_example(request=request) # Handle the response print(response)
- Parameters
request (Union[google.cloud.datalabeling_v1beta1.types.GetExampleRequest, dict]) – The request object. Request message for GetExample
name (str) –
Required. Name of example, format: projects/{project_id}/datasets/{dataset_id}/annotatedDatasets/ {annotated_dataset_id}/examples/{example_id}
This corresponds to the
name
field on therequest
instance; ifrequest
is provided, this should not be set.filter (str) –
Optional. An expression for filtering Examples. Filter by annotation_spec.display_name is supported. Format “annotation_spec.display_name = {display_name}”
This corresponds to the
filter
field on therequest
instance; ifrequest
is provided, this should not be set.retry (google.api_core.retry.Retry) – Designation of what errors, if any, should be retried.
timeout (float) – The timeout for this request.
metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.
- Returns
An Example is a piece of data and its annotation. For example, an image with label “house”.
- Return type
- get_instruction(request: Optional[Union[google.cloud.datalabeling_v1beta1.types.data_labeling_service.GetInstructionRequest, dict]] = None, *, name: Optional[str] = None, retry: Optional[Union[google.api_core.retry.retry_unary.Retry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.cloud.datalabeling_v1beta1.types.instruction.Instruction [source]¶
Gets an instruction by resource name.
# This snippet has been automatically generated and should be regarded as a # code template only. # It will require modifications to work: # - It may require correct/in-range values for request initialization. # - It may require specifying regional endpoints when creating the service # client as shown in: # https://googleapis.dev/python/google-api-core/latest/client_options.html from google.cloud import datalabeling_v1beta1 def sample_get_instruction(): # Create a client client = datalabeling_v1beta1.DataLabelingServiceClient() # Initialize request argument(s) request = datalabeling_v1beta1.GetInstructionRequest( name="name_value", ) # Make the request response = client.get_instruction(request=request) # Handle the response print(response)
- Parameters
request (Union[google.cloud.datalabeling_v1beta1.types.GetInstructionRequest, dict]) – The request object. Request message for GetInstruction.
name (str) –
Required. Instruction resource name, format: projects/{project_id}/instructions/{instruction_id}
This corresponds to the
name
field on therequest
instance; ifrequest
is provided, this should not be set.retry (google.api_core.retry.Retry) – Designation of what errors, if any, should be retried.
timeout (float) – The timeout for this request.
metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.
- Returns
Instruction of how to perform the labeling task for human operators. Currently only PDF instruction is supported.
- Return type
- classmethod get_mtls_endpoint_and_cert_source(client_options: Optional[google.api_core.client_options.ClientOptions] = None)[source]¶
Deprecated. Return the API endpoint and client cert source for mutual TLS.
The client cert source is determined in the following order: (1) if GOOGLE_API_USE_CLIENT_CERTIFICATE environment variable is not “true”, the client cert source is None. (2) if client_options.client_cert_source is provided, use the provided one; if the default client cert source exists, use the default one; otherwise the client cert source is None.
The API endpoint is determined in the following order: (1) if client_options.api_endpoint if provided, use the provided one. (2) if GOOGLE_API_USE_CLIENT_CERTIFICATE environment variable is “always”, use the default mTLS endpoint; if the environment variable is “never”, use the default API endpoint; otherwise if client cert source exists, use the default mTLS endpoint, otherwise use the default API endpoint.
More details can be found at https://google.aip.dev/auth/4114.
- Parameters
client_options (google.api_core.client_options.ClientOptions) – Custom options for the client. Only the api_endpoint and client_cert_source properties may be used in this method.
- Returns
- returns the API endpoint and the
client cert source to use.
- Return type
- Raises
google.auth.exceptions.MutualTLSChannelError – If any errors happen.
- import_data(request: Optional[Union[google.cloud.datalabeling_v1beta1.types.data_labeling_service.ImportDataRequest, dict]] = None, *, name: Optional[str] = None, input_config: Optional[google.cloud.datalabeling_v1beta1.types.dataset.InputConfig] = None, retry: Optional[Union[google.api_core.retry.retry_unary.Retry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.api_core.operation.Operation [source]¶
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.
# This snippet has been automatically generated and should be regarded as a # code template only. # It will require modifications to work: # - It may require correct/in-range values for request initialization. # - It may require specifying regional endpoints when creating the service # client as shown in: # https://googleapis.dev/python/google-api-core/latest/client_options.html from google.cloud import datalabeling_v1beta1 def sample_import_data(): # Create a client client = datalabeling_v1beta1.DataLabelingServiceClient() # Initialize request argument(s) request = datalabeling_v1beta1.ImportDataRequest( name="name_value", ) # Make the request operation = client.import_data(request=request) print("Waiting for operation to complete...") response = operation.result() # Handle the response print(response)
- Parameters
request (Union[google.cloud.datalabeling_v1beta1.types.ImportDataRequest, dict]) – The request object. Request message for ImportData API.
name (str) –
Required. Dataset resource name, format: projects/{project_id}/datasets/{dataset_id}
This corresponds to the
name
field on therequest
instance; ifrequest
is provided, this should not be set.input_config (google.cloud.datalabeling_v1beta1.types.InputConfig) –
Required. Specify the input source of the data.
This corresponds to the
input_config
field on therequest
instance; ifrequest
is provided, this should not be set.retry (google.api_core.retry.Retry) – Designation of what errors, if any, should be retried.
timeout (float) – The timeout for this request.
metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.
- Returns
An object representing a long-running operation.
The result type for the operation will be
google.cloud.datalabeling_v1beta1.types.ImportDataOperationResponse
Response used for ImportData longrunning operation.- Return type
- static instruction_path(project: str, instruction: str) str [source]¶
Returns a fully-qualified instruction string.
- label_image(request: Optional[Union[google.cloud.datalabeling_v1beta1.types.data_labeling_service.LabelImageRequest, dict]] = None, *, parent: Optional[str] = None, basic_config: Optional[google.cloud.datalabeling_v1beta1.types.human_annotation_config.HumanAnnotationConfig] = None, feature: Optional[google.cloud.datalabeling_v1beta1.types.data_labeling_service.LabelImageRequest.Feature] = None, retry: Optional[Union[google.api_core.retry.retry_unary.Retry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.api_core.operation.Operation [source]¶
Starts a labeling task for image. The type of image labeling task is configured by feature in the request.
# This snippet has been automatically generated and should be regarded as a # code template only. # It will require modifications to work: # - It may require correct/in-range values for request initialization. # - It may require specifying regional endpoints when creating the service # client as shown in: # https://googleapis.dev/python/google-api-core/latest/client_options.html from google.cloud import datalabeling_v1beta1 def sample_label_image(): # Create a client client = datalabeling_v1beta1.DataLabelingServiceClient() # Initialize request argument(s) image_classification_config = datalabeling_v1beta1.ImageClassificationConfig() image_classification_config.annotation_spec_set = "annotation_spec_set_value" basic_config = datalabeling_v1beta1.HumanAnnotationConfig() basic_config.instruction = "instruction_value" basic_config.annotated_dataset_display_name = "annotated_dataset_display_name_value" request = datalabeling_v1beta1.LabelImageRequest( image_classification_config=image_classification_config, parent="parent_value", basic_config=basic_config, feature="SEGMENTATION", ) # Make the request operation = client.label_image(request=request) print("Waiting for operation to complete...") response = operation.result() # Handle the response print(response)
- Parameters
request (Union[google.cloud.datalabeling_v1beta1.types.LabelImageRequest, dict]) – The request object. Request message for starting an image labeling task.
parent (str) –
Required. Name of the dataset to request labeling task, format: projects/{project_id}/datasets/{dataset_id}
This corresponds to the
parent
field on therequest
instance; ifrequest
is provided, this should not be set.basic_config (google.cloud.datalabeling_v1beta1.types.HumanAnnotationConfig) –
Required. Basic human annotation config.
This corresponds to the
basic_config
field on therequest
instance; ifrequest
is provided, this should not be set.feature (google.cloud.datalabeling_v1beta1.types.LabelImageRequest.Feature) –
Required. The type of image labeling task.
This corresponds to the
feature
field on therequest
instance; ifrequest
is provided, this should not be set.retry (google.api_core.retry.Retry) – Designation of what errors, if any, should be retried.
timeout (float) – The timeout for this request.
metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.
- Returns
An object representing a long-running operation.
- The result type for the operation will be
google.cloud.datalabeling_v1beta1.types.AnnotatedDataset
AnnotatedDataset is a set holding annotations for data in a Dataset. Each labeling task will generate an AnnotatedDataset under the Dataset that the task is requested for.
- The result type for the operation will be
- Return type
- label_text(request: Optional[Union[google.cloud.datalabeling_v1beta1.types.data_labeling_service.LabelTextRequest, dict]] = None, *, parent: Optional[str] = None, basic_config: Optional[google.cloud.datalabeling_v1beta1.types.human_annotation_config.HumanAnnotationConfig] = None, feature: Optional[google.cloud.datalabeling_v1beta1.types.data_labeling_service.LabelTextRequest.Feature] = None, retry: Optional[Union[google.api_core.retry.retry_unary.Retry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.api_core.operation.Operation [source]¶
Starts a labeling task for text. The type of text labeling task is configured by feature in the request.
# This snippet has been automatically generated and should be regarded as a # code template only. # It will require modifications to work: # - It may require correct/in-range values for request initialization. # - It may require specifying regional endpoints when creating the service # client as shown in: # https://googleapis.dev/python/google-api-core/latest/client_options.html from google.cloud import datalabeling_v1beta1 def sample_label_text(): # Create a client client = datalabeling_v1beta1.DataLabelingServiceClient() # Initialize request argument(s) text_classification_config = datalabeling_v1beta1.TextClassificationConfig() text_classification_config.annotation_spec_set = "annotation_spec_set_value" basic_config = datalabeling_v1beta1.HumanAnnotationConfig() basic_config.instruction = "instruction_value" basic_config.annotated_dataset_display_name = "annotated_dataset_display_name_value" request = datalabeling_v1beta1.LabelTextRequest( text_classification_config=text_classification_config, parent="parent_value", basic_config=basic_config, feature="TEXT_ENTITY_EXTRACTION", ) # Make the request operation = client.label_text(request=request) print("Waiting for operation to complete...") response = operation.result() # Handle the response print(response)
- Parameters
request (Union[google.cloud.datalabeling_v1beta1.types.LabelTextRequest, dict]) – The request object. Request message for LabelText.
parent (str) –
Required. Name of the data set to request labeling task, format: projects/{project_id}/datasets/{dataset_id}
This corresponds to the
parent
field on therequest
instance; ifrequest
is provided, this should not be set.basic_config (google.cloud.datalabeling_v1beta1.types.HumanAnnotationConfig) –
Required. Basic human annotation config.
This corresponds to the
basic_config
field on therequest
instance; ifrequest
is provided, this should not be set.feature (google.cloud.datalabeling_v1beta1.types.LabelTextRequest.Feature) –
Required. The type of text labeling task.
This corresponds to the
feature
field on therequest
instance; ifrequest
is provided, this should not be set.retry (google.api_core.retry.Retry) – Designation of what errors, if any, should be retried.
timeout (float) – The timeout for this request.
metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.
- Returns
An object representing a long-running operation.
- The result type for the operation will be
google.cloud.datalabeling_v1beta1.types.AnnotatedDataset
AnnotatedDataset is a set holding annotations for data in a Dataset. Each labeling task will generate an AnnotatedDataset under the Dataset that the task is requested for.
- The result type for the operation will be
- Return type
- label_video(request: Optional[Union[google.cloud.datalabeling_v1beta1.types.data_labeling_service.LabelVideoRequest, dict]] = None, *, parent: Optional[str] = None, basic_config: Optional[google.cloud.datalabeling_v1beta1.types.human_annotation_config.HumanAnnotationConfig] = None, feature: Optional[google.cloud.datalabeling_v1beta1.types.data_labeling_service.LabelVideoRequest.Feature] = None, retry: Optional[Union[google.api_core.retry.retry_unary.Retry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.api_core.operation.Operation [source]¶
Starts a labeling task for video. The type of video labeling task is configured by feature in the request.
# This snippet has been automatically generated and should be regarded as a # code template only. # It will require modifications to work: # - It may require correct/in-range values for request initialization. # - It may require specifying regional endpoints when creating the service # client as shown in: # https://googleapis.dev/python/google-api-core/latest/client_options.html from google.cloud import datalabeling_v1beta1 def sample_label_video(): # Create a client client = datalabeling_v1beta1.DataLabelingServiceClient() # Initialize request argument(s) video_classification_config = datalabeling_v1beta1.VideoClassificationConfig() video_classification_config.annotation_spec_set_configs.annotation_spec_set = "annotation_spec_set_value" basic_config = datalabeling_v1beta1.HumanAnnotationConfig() basic_config.instruction = "instruction_value" basic_config.annotated_dataset_display_name = "annotated_dataset_display_name_value" request = datalabeling_v1beta1.LabelVideoRequest( video_classification_config=video_classification_config, parent="parent_value", basic_config=basic_config, feature="EVENT", ) # Make the request operation = client.label_video(request=request) print("Waiting for operation to complete...") response = operation.result() # Handle the response print(response)
- Parameters
request (Union[google.cloud.datalabeling_v1beta1.types.LabelVideoRequest, dict]) – The request object. Request message for LabelVideo.
parent (str) –
Required. Name of the dataset to request labeling task, format: projects/{project_id}/datasets/{dataset_id}
This corresponds to the
parent
field on therequest
instance; ifrequest
is provided, this should not be set.basic_config (google.cloud.datalabeling_v1beta1.types.HumanAnnotationConfig) –
Required. Basic human annotation config.
This corresponds to the
basic_config
field on therequest
instance; ifrequest
is provided, this should not be set.feature (google.cloud.datalabeling_v1beta1.types.LabelVideoRequest.Feature) –
Required. The type of video labeling task.
This corresponds to the
feature
field on therequest
instance; ifrequest
is provided, this should not be set.retry (google.api_core.retry.Retry) – Designation of what errors, if any, should be retried.
timeout (float) – The timeout for this request.
metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.
- Returns
An object representing a long-running operation.
- The result type for the operation will be
google.cloud.datalabeling_v1beta1.types.AnnotatedDataset
AnnotatedDataset is a set holding annotations for data in a Dataset. Each labeling task will generate an AnnotatedDataset under the Dataset that the task is requested for.
- The result type for the operation will be
- Return type
- list_annotated_datasets(request: Optional[Union[google.cloud.datalabeling_v1beta1.types.data_labeling_service.ListAnnotatedDatasetsRequest, dict]] = None, *, parent: Optional[str] = None, filter: Optional[str] = None, retry: Optional[Union[google.api_core.retry.retry_unary.Retry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.cloud.datalabeling_v1beta1.services.data_labeling_service.pagers.ListAnnotatedDatasetsPager [source]¶
Lists annotated datasets for a dataset. Pagination is supported.
# This snippet has been automatically generated and should be regarded as a # code template only. # It will require modifications to work: # - It may require correct/in-range values for request initialization. # - It may require specifying regional endpoints when creating the service # client as shown in: # https://googleapis.dev/python/google-api-core/latest/client_options.html from google.cloud import datalabeling_v1beta1 def sample_list_annotated_datasets(): # Create a client client = datalabeling_v1beta1.DataLabelingServiceClient() # Initialize request argument(s) request = datalabeling_v1beta1.ListAnnotatedDatasetsRequest( parent="parent_value", ) # Make the request page_result = client.list_annotated_datasets(request=request) # Handle the response for response in page_result: print(response)
- Parameters
request (Union[google.cloud.datalabeling_v1beta1.types.ListAnnotatedDatasetsRequest, dict]) – The request object. Request message for ListAnnotatedDatasets.
parent (str) –
Required. Name of the dataset to list annotated datasets, format: projects/{project_id}/datasets/{dataset_id}
This corresponds to the
parent
field on therequest
instance; ifrequest
is provided, this should not be set.filter (str) –
Optional. Filter is not supported at this moment.
This corresponds to the
filter
field on therequest
instance; ifrequest
is provided, this should not be set.retry (google.api_core.retry.Retry) – Designation of what errors, if any, should be retried.
timeout (float) – The timeout for this request.
metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.
- Returns
Results of listing annotated datasets for a dataset. Iterating over this object will yield results and resolve additional pages automatically.
- Return type
google.cloud.datalabeling_v1beta1.services.data_labeling_service.pagers.ListAnnotatedDatasetsPager
- list_annotation_spec_sets(request: Optional[Union[google.cloud.datalabeling_v1beta1.types.data_labeling_service.ListAnnotationSpecSetsRequest, dict]] = None, *, parent: Optional[str] = None, filter: Optional[str] = None, retry: Optional[Union[google.api_core.retry.retry_unary.Retry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.cloud.datalabeling_v1beta1.services.data_labeling_service.pagers.ListAnnotationSpecSetsPager [source]¶
Lists annotation spec sets for a project. Pagination is supported.
# This snippet has been automatically generated and should be regarded as a # code template only. # It will require modifications to work: # - It may require correct/in-range values for request initialization. # - It may require specifying regional endpoints when creating the service # client as shown in: # https://googleapis.dev/python/google-api-core/latest/client_options.html from google.cloud import datalabeling_v1beta1 def sample_list_annotation_spec_sets(): # Create a client client = datalabeling_v1beta1.DataLabelingServiceClient() # Initialize request argument(s) request = datalabeling_v1beta1.ListAnnotationSpecSetsRequest( parent="parent_value", ) # Make the request page_result = client.list_annotation_spec_sets(request=request) # Handle the response for response in page_result: print(response)
- Parameters
request (Union[google.cloud.datalabeling_v1beta1.types.ListAnnotationSpecSetsRequest, dict]) – The request object. Request message for ListAnnotationSpecSets.
parent (str) –
Required. Parent of AnnotationSpecSet resource, format: projects/{project_id}
This corresponds to the
parent
field on therequest
instance; ifrequest
is provided, this should not be set.filter (str) –
Optional. Filter is not supported at this moment.
This corresponds to the
filter
field on therequest
instance; ifrequest
is provided, this should not be set.retry (google.api_core.retry.Retry) – Designation of what errors, if any, should be retried.
timeout (float) – The timeout for this request.
metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.
- Returns
Results of listing annotation spec set under a project. Iterating over this object will yield results and resolve additional pages automatically.
- Return type
google.cloud.datalabeling_v1beta1.services.data_labeling_service.pagers.ListAnnotationSpecSetsPager
- list_data_items(request: Optional[Union[google.cloud.datalabeling_v1beta1.types.data_labeling_service.ListDataItemsRequest, dict]] = None, *, parent: Optional[str] = None, filter: Optional[str] = None, retry: Optional[Union[google.api_core.retry.retry_unary.Retry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.cloud.datalabeling_v1beta1.services.data_labeling_service.pagers.ListDataItemsPager [source]¶
Lists data items in a dataset. This API can be called after data are imported into dataset. Pagination is supported.
# This snippet has been automatically generated and should be regarded as a # code template only. # It will require modifications to work: # - It may require correct/in-range values for request initialization. # - It may require specifying regional endpoints when creating the service # client as shown in: # https://googleapis.dev/python/google-api-core/latest/client_options.html from google.cloud import datalabeling_v1beta1 def sample_list_data_items(): # Create a client client = datalabeling_v1beta1.DataLabelingServiceClient() # Initialize request argument(s) request = datalabeling_v1beta1.ListDataItemsRequest( parent="parent_value", ) # Make the request page_result = client.list_data_items(request=request) # Handle the response for response in page_result: print(response)
- Parameters
request (Union[google.cloud.datalabeling_v1beta1.types.ListDataItemsRequest, dict]) – The request object. Request message for ListDataItems.
parent (str) –
Required. Name of the dataset to list data items, format: projects/{project_id}/datasets/{dataset_id}
This corresponds to the
parent
field on therequest
instance; ifrequest
is provided, this should not be set.filter (str) –
Optional. Filter is not supported at this moment.
This corresponds to the
filter
field on therequest
instance; ifrequest
is provided, this should not be set.retry (google.api_core.retry.Retry) – Designation of what errors, if any, should be retried.
timeout (float) – The timeout for this request.
metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.
- Returns
Results of listing data items in a dataset. Iterating over this object will yield results and resolve additional pages automatically.
- Return type
google.cloud.datalabeling_v1beta1.services.data_labeling_service.pagers.ListDataItemsPager
- list_datasets(request: Optional[Union[google.cloud.datalabeling_v1beta1.types.data_labeling_service.ListDatasetsRequest, dict]] = None, *, parent: Optional[str] = None, filter: Optional[str] = None, retry: Optional[Union[google.api_core.retry.retry_unary.Retry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.cloud.datalabeling_v1beta1.services.data_labeling_service.pagers.ListDatasetsPager [source]¶
Lists datasets under a project. Pagination is supported.
# This snippet has been automatically generated and should be regarded as a # code template only. # It will require modifications to work: # - It may require correct/in-range values for request initialization. # - It may require specifying regional endpoints when creating the service # client as shown in: # https://googleapis.dev/python/google-api-core/latest/client_options.html from google.cloud import datalabeling_v1beta1 def sample_list_datasets(): # Create a client client = datalabeling_v1beta1.DataLabelingServiceClient() # Initialize request argument(s) request = datalabeling_v1beta1.ListDatasetsRequest( parent="parent_value", ) # Make the request page_result = client.list_datasets(request=request) # Handle the response for response in page_result: print(response)
- Parameters
request (Union[google.cloud.datalabeling_v1beta1.types.ListDatasetsRequest, dict]) – The request object. Request message for ListDataset.
parent (str) –
Required. Dataset resource parent, format: projects/{project_id}
This corresponds to the
parent
field on therequest
instance; ifrequest
is provided, this should not be set.filter (str) –
Optional. Filter on dataset is not supported at this moment.
This corresponds to the
filter
field on therequest
instance; ifrequest
is provided, this should not be set.retry (google.api_core.retry.Retry) – Designation of what errors, if any, should be retried.
timeout (float) – The timeout for this request.
metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.
- Returns
Results of listing datasets within a project. Iterating over this object will yield results and resolve additional pages automatically.
- Return type
google.cloud.datalabeling_v1beta1.services.data_labeling_service.pagers.ListDatasetsPager
- list_evaluation_jobs(request: Optional[Union[google.cloud.datalabeling_v1beta1.types.data_labeling_service.ListEvaluationJobsRequest, dict]] = None, *, parent: Optional[str] = None, filter: Optional[str] = None, retry: Optional[Union[google.api_core.retry.retry_unary.Retry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.cloud.datalabeling_v1beta1.services.data_labeling_service.pagers.ListEvaluationJobsPager [source]¶
Lists all evaluation jobs within a project with possible filters. Pagination is supported.
# This snippet has been automatically generated and should be regarded as a # code template only. # It will require modifications to work: # - It may require correct/in-range values for request initialization. # - It may require specifying regional endpoints when creating the service # client as shown in: # https://googleapis.dev/python/google-api-core/latest/client_options.html from google.cloud import datalabeling_v1beta1 def sample_list_evaluation_jobs(): # Create a client client = datalabeling_v1beta1.DataLabelingServiceClient() # Initialize request argument(s) request = datalabeling_v1beta1.ListEvaluationJobsRequest( parent="parent_value", ) # Make the request page_result = client.list_evaluation_jobs(request=request) # Handle the response for response in page_result: print(response)
- Parameters
request (Union[google.cloud.datalabeling_v1beta1.types.ListEvaluationJobsRequest, dict]) – The request object. Request message for ListEvaluationJobs.
parent (str) –
Required. Evaluation job resource parent. Format: “projects/{project_id}”
This corresponds to the
parent
field on therequest
instance; ifrequest
is provided, this should not be set.filter (str) –
Optional. You can filter the jobs to list by model_id (also known as model_name, as described in [EvaluationJob.modelVersion][google.cloud.datalabeling.v1beta1.EvaluationJob.model_version]) or by evaluation job state (as described in [EvaluationJob.state][google.cloud.datalabeling.v1beta1.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}”This corresponds to the
filter
field on therequest
instance; ifrequest
is provided, this should not be set.retry (google.api_core.retry.Retry) – Designation of what errors, if any, should be retried.
timeout (float) – The timeout for this request.
metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.
- Returns
Results for listing evaluation jobs.
Iterating over this object will yield results and resolve additional pages automatically.
- Return type
google.cloud.datalabeling_v1beta1.services.data_labeling_service.pagers.ListEvaluationJobsPager
- list_examples(request: Optional[Union[google.cloud.datalabeling_v1beta1.types.data_labeling_service.ListExamplesRequest, dict]] = None, *, parent: Optional[str] = None, filter: Optional[str] = None, retry: Optional[Union[google.api_core.retry.retry_unary.Retry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.cloud.datalabeling_v1beta1.services.data_labeling_service.pagers.ListExamplesPager [source]¶
Lists examples in an annotated dataset. Pagination is supported.
# This snippet has been automatically generated and should be regarded as a # code template only. # It will require modifications to work: # - It may require correct/in-range values for request initialization. # - It may require specifying regional endpoints when creating the service # client as shown in: # https://googleapis.dev/python/google-api-core/latest/client_options.html from google.cloud import datalabeling_v1beta1 def sample_list_examples(): # Create a client client = datalabeling_v1beta1.DataLabelingServiceClient() # Initialize request argument(s) request = datalabeling_v1beta1.ListExamplesRequest( parent="parent_value", ) # Make the request page_result = client.list_examples(request=request) # Handle the response for response in page_result: print(response)
- Parameters
request (Union[google.cloud.datalabeling_v1beta1.types.ListExamplesRequest, dict]) – The request object. Request message for ListExamples.
parent (str) – Required. Example resource parent. This corresponds to the
parent
field on therequest
instance; ifrequest
is provided, this should not be set.filter (str) –
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}”
This corresponds to the
filter
field on therequest
instance; ifrequest
is provided, this should not be set.retry (google.api_core.retry.Retry) – Designation of what errors, if any, should be retried.
timeout (float) – The timeout for this request.
metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.
- Returns
Results of listing Examples in and annotated dataset. Iterating over this object will yield results and resolve additional pages automatically.
- Return type
google.cloud.datalabeling_v1beta1.services.data_labeling_service.pagers.ListExamplesPager
- list_instructions(request: Optional[Union[google.cloud.datalabeling_v1beta1.types.data_labeling_service.ListInstructionsRequest, dict]] = None, *, parent: Optional[str] = None, filter: Optional[str] = None, retry: Optional[Union[google.api_core.retry.retry_unary.Retry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.cloud.datalabeling_v1beta1.services.data_labeling_service.pagers.ListInstructionsPager [source]¶
Lists instructions for a project. Pagination is supported.
# This snippet has been automatically generated and should be regarded as a # code template only. # It will require modifications to work: # - It may require correct/in-range values for request initialization. # - It may require specifying regional endpoints when creating the service # client as shown in: # https://googleapis.dev/python/google-api-core/latest/client_options.html from google.cloud import datalabeling_v1beta1 def sample_list_instructions(): # Create a client client = datalabeling_v1beta1.DataLabelingServiceClient() # Initialize request argument(s) request = datalabeling_v1beta1.ListInstructionsRequest( parent="parent_value", ) # Make the request page_result = client.list_instructions(request=request) # Handle the response for response in page_result: print(response)
- Parameters
request (Union[google.cloud.datalabeling_v1beta1.types.ListInstructionsRequest, dict]) – The request object. Request message for ListInstructions.
parent (str) –
Required. Instruction resource parent, format: projects/{project_id}
This corresponds to the
parent
field on therequest
instance; ifrequest
is provided, this should not be set.filter (str) –
Optional. Filter is not supported at this moment.
This corresponds to the
filter
field on therequest
instance; ifrequest
is provided, this should not be set.retry (google.api_core.retry.Retry) – Designation of what errors, if any, should be retried.
timeout (float) – The timeout for this request.
metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.
- Returns
Results of listing instructions under a project. Iterating over this object will yield results and resolve additional pages automatically.
- Return type
google.cloud.datalabeling_v1beta1.services.data_labeling_service.pagers.ListInstructionsPager
- static parse_annotated_dataset_path(path: str) Dict[str, str] [source]¶
Parses a annotated_dataset path into its component segments.
- static parse_annotation_spec_set_path(path: str) Dict[str, str] [source]¶
Parses a annotation_spec_set path into its component segments.
- static parse_common_billing_account_path(path: str) Dict[str, str] [source]¶
Parse a billing_account path into its component segments.
- static parse_common_folder_path(path: str) Dict[str, str] [source]¶
Parse a folder path into its component segments.
- static parse_common_location_path(path: str) Dict[str, str] [source]¶
Parse a location path into its component segments.
- static parse_common_organization_path(path: str) Dict[str, str] [source]¶
Parse a organization path into its component segments.
- static parse_common_project_path(path: str) Dict[str, str] [source]¶
Parse a project path into its component segments.
- static parse_data_item_path(path: str) Dict[str, str] [source]¶
Parses a data_item path into its component segments.
- static parse_dataset_path(path: str) Dict[str, str] [source]¶
Parses a dataset path into its component segments.
- static parse_evaluation_job_path(path: str) Dict[str, str] [source]¶
Parses a evaluation_job path into its component segments.
- static parse_evaluation_path(path: str) Dict[str, str] [source]¶
Parses a evaluation path into its component segments.
- static parse_example_path(path: str) Dict[str, str] [source]¶
Parses a example path into its component segments.
- static parse_instruction_path(path: str) Dict[str, str] [source]¶
Parses a instruction path into its component segments.
- pause_evaluation_job(request: Optional[Union[google.cloud.datalabeling_v1beta1.types.data_labeling_service.PauseEvaluationJobRequest, dict]] = None, *, name: Optional[str] = None, retry: Optional[Union[google.api_core.retry.retry_unary.Retry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) None [source]¶
Pauses an evaluation job. Pausing an evaluation job that is already in a
PAUSED
state is a no-op.# This snippet has been automatically generated and should be regarded as a # code template only. # It will require modifications to work: # - It may require correct/in-range values for request initialization. # - It may require specifying regional endpoints when creating the service # client as shown in: # https://googleapis.dev/python/google-api-core/latest/client_options.html from google.cloud import datalabeling_v1beta1 def sample_pause_evaluation_job(): # Create a client client = datalabeling_v1beta1.DataLabelingServiceClient() # Initialize request argument(s) request = datalabeling_v1beta1.PauseEvaluationJobRequest( name="name_value", ) # Make the request client.pause_evaluation_job(request=request)
- Parameters
request (Union[google.cloud.datalabeling_v1beta1.types.PauseEvaluationJobRequest, dict]) – The request object. Request message for PauseEvaluationJob.
name (str) –
Required. Name of the evaluation job that is going to be paused. Format:
”projects/{project_id}/evaluationJobs/{evaluation_job_id}”
This corresponds to the
name
field on therequest
instance; ifrequest
is provided, this should not be set.retry (google.api_core.retry.Retry) – Designation of what errors, if any, should be retried.
timeout (float) – The timeout for this request.
metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.
- resume_evaluation_job(request: Optional[Union[google.cloud.datalabeling_v1beta1.types.data_labeling_service.ResumeEvaluationJobRequest, dict]] = None, *, name: Optional[str] = None, retry: Optional[Union[google.api_core.retry.retry_unary.Retry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) None [source]¶
Resumes a paused evaluation job. A deleted evaluation job can’t be resumed. Resuming a running or scheduled evaluation job is a no-op.
# This snippet has been automatically generated and should be regarded as a # code template only. # It will require modifications to work: # - It may require correct/in-range values for request initialization. # - It may require specifying regional endpoints when creating the service # client as shown in: # https://googleapis.dev/python/google-api-core/latest/client_options.html from google.cloud import datalabeling_v1beta1 def sample_resume_evaluation_job(): # Create a client client = datalabeling_v1beta1.DataLabelingServiceClient() # Initialize request argument(s) request = datalabeling_v1beta1.ResumeEvaluationJobRequest( name="name_value", ) # Make the request client.resume_evaluation_job(request=request)
- Parameters
request (Union[google.cloud.datalabeling_v1beta1.types.ResumeEvaluationJobRequest, dict]) – The request object. Request message ResumeEvaluationJob.
name (str) –
Required. Name of the evaluation job that is going to be resumed. Format:
”projects/{project_id}/evaluationJobs/{evaluation_job_id}”
This corresponds to the
name
field on therequest
instance; ifrequest
is provided, this should not be set.retry (google.api_core.retry.Retry) – Designation of what errors, if any, should be retried.
timeout (float) – The timeout for this request.
metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.
- search_evaluations(request: Optional[Union[google.cloud.datalabeling_v1beta1.types.data_labeling_service.SearchEvaluationsRequest, dict]] = None, *, parent: Optional[str] = None, filter: Optional[str] = None, retry: Optional[Union[google.api_core.retry.retry_unary.Retry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.cloud.datalabeling_v1beta1.services.data_labeling_service.pagers.SearchEvaluationsPager [source]¶
Searches [evaluations][google.cloud.datalabeling.v1beta1.Evaluation] within a project.
# This snippet has been automatically generated and should be regarded as a # code template only. # It will require modifications to work: # - It may require correct/in-range values for request initialization. # - It may require specifying regional endpoints when creating the service # client as shown in: # https://googleapis.dev/python/google-api-core/latest/client_options.html from google.cloud import datalabeling_v1beta1 def sample_search_evaluations(): # Create a client client = datalabeling_v1beta1.DataLabelingServiceClient() # Initialize request argument(s) request = datalabeling_v1beta1.SearchEvaluationsRequest( parent="parent_value", ) # Make the request page_result = client.search_evaluations(request=request) # Handle the response for response in page_result: print(response)
- Parameters
request (Union[google.cloud.datalabeling_v1beta1.types.SearchEvaluationsRequest, dict]) – The request object. Request message for SearchEvaluation.
parent (str) –
Required. Evaluation search parent (project ID). Format: “projects/{project_id}”
This corresponds to the
parent
field on therequest
instance; ifrequest
is provided, this should not be set.filter (str) –
Optional. To search evaluations, you can filter by the following:
evaluation_job.evaluation_job_id (the last part of [EvaluationJob.name][google.cloud.datalabeling.v1beta1.EvaluationJob.name])
evaluation_job.model_id (the {model_name} portion of [EvaluationJob.modelVersion][google.cloud.datalabeling.v1beta1.EvaluationJob.model_version])
evaluation_job.evaluation_job_run_time_start (Minimum threshold for the [evaluationJobRunTime][google.cloud.datalabeling.v1beta1.Evaluation.evaluation_job_run_time] that created the evaluation)
evaluation_job.evaluation_job_run_time_end (Maximum threshold for the [evaluationJobRunTime][google.cloud.datalabeling.v1beta1.Evaluation.evaluation_job_run_time] that created the evaluation)
evaluation_job.job_state ([EvaluationJob.state][google.cloud.datalabeling.v1beta1.EvaluationJob.state])
annotation_spec.display_name (the Evaluation contains a metric for the annotation spec with this [displayName][google.cloud.datalabeling.v1beta1.AnnotationSpec.display_name])
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}”
This corresponds to the
filter
field on therequest
instance; ifrequest
is provided, this should not be set.retry (google.api_core.retry.Retry) – Designation of what errors, if any, should be retried.
timeout (float) – The timeout for this request.
metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.
- Returns
Results of searching evaluations.
Iterating over this object will yield results and resolve additional pages automatically.
- Return type
google.cloud.datalabeling_v1beta1.services.data_labeling_service.pagers.SearchEvaluationsPager
- search_example_comparisons(request: Optional[Union[google.cloud.datalabeling_v1beta1.types.data_labeling_service.SearchExampleComparisonsRequest, dict]] = None, *, parent: Optional[str] = None, retry: Optional[Union[google.api_core.retry.retry_unary.Retry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.cloud.datalabeling_v1beta1.services.data_labeling_service.pagers.SearchExampleComparisonsPager [source]¶
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.
# This snippet has been automatically generated and should be regarded as a # code template only. # It will require modifications to work: # - It may require correct/in-range values for request initialization. # - It may require specifying regional endpoints when creating the service # client as shown in: # https://googleapis.dev/python/google-api-core/latest/client_options.html from google.cloud import datalabeling_v1beta1 def sample_search_example_comparisons(): # Create a client client = datalabeling_v1beta1.DataLabelingServiceClient() # Initialize request argument(s) request = datalabeling_v1beta1.SearchExampleComparisonsRequest( parent="parent_value", ) # Make the request page_result = client.search_example_comparisons(request=request) # Handle the response for response in page_result: print(response)
- Parameters
request (Union[google.cloud.datalabeling_v1beta1.types.SearchExampleComparisonsRequest, dict]) – The request object. Request message of SearchExampleComparisons.
parent (str) –
Required. Name of the [Evaluation][google.cloud.datalabeling.v1beta1.Evaluation] resource to search for example comparisons from. Format:
”projects/{project_id}/datasets/{dataset_id}/evaluations/{evaluation_id}”
This corresponds to the
parent
field on therequest
instance; ifrequest
is provided, this should not be set.retry (google.api_core.retry.Retry) – Designation of what errors, if any, should be retried.
timeout (float) – The timeout for this request.
metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.
- Returns
Results of searching example comparisons. Iterating over this object will yield results and resolve additional pages automatically.
- Return type
- property transport: google.cloud.datalabeling_v1beta1.services.data_labeling_service.transports.base.DataLabelingServiceTransport¶
Returns the transport used by the client instance.
- Returns
- The transport used by the client
instance.
- Return type
DataLabelingServiceTransport
- property universe_domain: str¶
Return the universe domain used by the client instance.
- Returns
The universe domain used by the client instance.
- Return type
- update_evaluation_job(request: Optional[Union[google.cloud.datalabeling_v1beta1.types.data_labeling_service.UpdateEvaluationJobRequest, dict]] = None, *, evaluation_job: Optional[google.cloud.datalabeling_v1beta1.types.evaluation_job.EvaluationJob] = None, update_mask: Optional[google.protobuf.field_mask_pb2.FieldMask] = None, retry: Optional[Union[google.api_core.retry.retry_unary.Retry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.cloud.datalabeling_v1beta1.types.evaluation_job.EvaluationJob [source]¶
Updates an evaluation job. You can only update certain fields of the job’s [EvaluationJobConfig][google.cloud.datalabeling.v1beta1.EvaluationJobConfig]:
humanAnnotationConfig.instruction
,exampleCount
, andexampleSamplePercentage
.If you want to change any other aspect of the evaluation job, you must delete the job and create a new one.
# This snippet has been automatically generated and should be regarded as a # code template only. # It will require modifications to work: # - It may require correct/in-range values for request initialization. # - It may require specifying regional endpoints when creating the service # client as shown in: # https://googleapis.dev/python/google-api-core/latest/client_options.html from google.cloud import datalabeling_v1beta1 def sample_update_evaluation_job(): # Create a client client = datalabeling_v1beta1.DataLabelingServiceClient() # Initialize request argument(s) request = datalabeling_v1beta1.UpdateEvaluationJobRequest( ) # Make the request response = client.update_evaluation_job(request=request) # Handle the response print(response)
- Parameters
request (Union[google.cloud.datalabeling_v1beta1.types.UpdateEvaluationJobRequest, dict]) – The request object. Request message for UpdateEvaluationJob.
evaluation_job (google.cloud.datalabeling_v1beta1.types.EvaluationJob) –
Required. Evaluation job that is going to be updated.
This corresponds to the
evaluation_job
field on therequest
instance; ifrequest
is provided, this should not be set.update_mask (google.protobuf.field_mask_pb2.FieldMask) –
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.
This corresponds to the
update_mask
field on therequest
instance; ifrequest
is provided, this should not be set.retry (google.api_core.retry.Retry) – Designation of what errors, if any, should be retried.
timeout (float) – The timeout for this request.
metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.
- Returns
- Defines an evaluation job that runs periodically to generate
[Evaluations][google.cloud.datalabeling.v1beta1.Evaluation]. [Creating an evaluation job](/ml-engine/docs/continuous-evaluation/create-job) is the starting point for using continuous evaluation.
- Return type
- class google.cloud.datalabeling_v1beta1.services.data_labeling_service.pagers.ListAnnotatedDatasetsAsyncPager(method: Callable[[...], Awaitable[google.cloud.datalabeling_v1beta1.types.data_labeling_service.ListAnnotatedDatasetsResponse]], request: google.cloud.datalabeling_v1beta1.types.data_labeling_service.ListAnnotatedDatasetsRequest, response: google.cloud.datalabeling_v1beta1.types.data_labeling_service.ListAnnotatedDatasetsResponse, *, retry: Optional[Union[google.api_core.retry.retry_unary_async.AsyncRetry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ())[source]¶
A pager for iterating through
list_annotated_datasets
requests.This class thinly wraps an initial
google.cloud.datalabeling_v1beta1.types.ListAnnotatedDatasetsResponse
object, and provides an__aiter__
method to iterate through itsannotated_datasets
field.If there are more pages, the
__aiter__
method will make additionalListAnnotatedDatasets
requests and continue to iterate through theannotated_datasets
field on the corresponding responses.All the usual
google.cloud.datalabeling_v1beta1.types.ListAnnotatedDatasetsResponse
attributes are available on the pager. If multiple requests are made, only the most recent response is retained, and thus used for attribute lookup.Instantiates the pager.
- Parameters
method (Callable) – The method that was originally called, and which instantiated this pager.
request (google.cloud.datalabeling_v1beta1.types.ListAnnotatedDatasetsRequest) – The initial request object.
response (google.cloud.datalabeling_v1beta1.types.ListAnnotatedDatasetsResponse) – The initial response object.
retry (google.api_core.retry.AsyncRetry) – Designation of what errors, if any, should be retried.
timeout (float) – The timeout for this request.
metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.
- class google.cloud.datalabeling_v1beta1.services.data_labeling_service.pagers.ListAnnotatedDatasetsPager(method: Callable[[...], google.cloud.datalabeling_v1beta1.types.data_labeling_service.ListAnnotatedDatasetsResponse], request: google.cloud.datalabeling_v1beta1.types.data_labeling_service.ListAnnotatedDatasetsRequest, response: google.cloud.datalabeling_v1beta1.types.data_labeling_service.ListAnnotatedDatasetsResponse, *, retry: Optional[Union[google.api_core.retry.retry_unary.Retry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ())[source]¶
A pager for iterating through
list_annotated_datasets
requests.This class thinly wraps an initial
google.cloud.datalabeling_v1beta1.types.ListAnnotatedDatasetsResponse
object, and provides an__iter__
method to iterate through itsannotated_datasets
field.If there are more pages, the
__iter__
method will make additionalListAnnotatedDatasets
requests and continue to iterate through theannotated_datasets
field on the corresponding responses.All the usual
google.cloud.datalabeling_v1beta1.types.ListAnnotatedDatasetsResponse
attributes are available on the pager. If multiple requests are made, only the most recent response is retained, and thus used for attribute lookup.Instantiate the pager.
- Parameters
method (Callable) – The method that was originally called, and which instantiated this pager.
request (google.cloud.datalabeling_v1beta1.types.ListAnnotatedDatasetsRequest) – The initial request object.
response (google.cloud.datalabeling_v1beta1.types.ListAnnotatedDatasetsResponse) – The initial response object.
retry (google.api_core.retry.Retry) – Designation of what errors, if any, should be retried.
timeout (float) – The timeout for this request.
metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.
- class google.cloud.datalabeling_v1beta1.services.data_labeling_service.pagers.ListAnnotationSpecSetsAsyncPager(method: Callable[[...], Awaitable[google.cloud.datalabeling_v1beta1.types.data_labeling_service.ListAnnotationSpecSetsResponse]], request: google.cloud.datalabeling_v1beta1.types.data_labeling_service.ListAnnotationSpecSetsRequest, response: google.cloud.datalabeling_v1beta1.types.data_labeling_service.ListAnnotationSpecSetsResponse, *, retry: Optional[Union[google.api_core.retry.retry_unary_async.AsyncRetry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ())[source]¶
A pager for iterating through
list_annotation_spec_sets
requests.This class thinly wraps an initial
google.cloud.datalabeling_v1beta1.types.ListAnnotationSpecSetsResponse
object, and provides an__aiter__
method to iterate through itsannotation_spec_sets
field.If there are more pages, the
__aiter__
method will make additionalListAnnotationSpecSets
requests and continue to iterate through theannotation_spec_sets
field on the corresponding responses.All the usual
google.cloud.datalabeling_v1beta1.types.ListAnnotationSpecSetsResponse
attributes are available on the pager. If multiple requests are made, only the most recent response is retained, and thus used for attribute lookup.Instantiates the pager.
- Parameters
method (Callable) – The method that was originally called, and which instantiated this pager.
request (google.cloud.datalabeling_v1beta1.types.ListAnnotationSpecSetsRequest) – The initial request object.
response (google.cloud.datalabeling_v1beta1.types.ListAnnotationSpecSetsResponse) – The initial response object.
retry (google.api_core.retry.AsyncRetry) – Designation of what errors, if any, should be retried.
timeout (float) – The timeout for this request.
metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.
- class google.cloud.datalabeling_v1beta1.services.data_labeling_service.pagers.ListAnnotationSpecSetsPager(method: Callable[[...], google.cloud.datalabeling_v1beta1.types.data_labeling_service.ListAnnotationSpecSetsResponse], request: google.cloud.datalabeling_v1beta1.types.data_labeling_service.ListAnnotationSpecSetsRequest, response: google.cloud.datalabeling_v1beta1.types.data_labeling_service.ListAnnotationSpecSetsResponse, *, retry: Optional[Union[google.api_core.retry.retry_unary.Retry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ())[source]¶
A pager for iterating through
list_annotation_spec_sets
requests.This class thinly wraps an initial
google.cloud.datalabeling_v1beta1.types.ListAnnotationSpecSetsResponse
object, and provides an__iter__
method to iterate through itsannotation_spec_sets
field.If there are more pages, the
__iter__
method will make additionalListAnnotationSpecSets
requests and continue to iterate through theannotation_spec_sets
field on the corresponding responses.All the usual
google.cloud.datalabeling_v1beta1.types.ListAnnotationSpecSetsResponse
attributes are available on the pager. If multiple requests are made, only the most recent response is retained, and thus used for attribute lookup.Instantiate the pager.
- Parameters
method (Callable) – The method that was originally called, and which instantiated this pager.
request (google.cloud.datalabeling_v1beta1.types.ListAnnotationSpecSetsRequest) – The initial request object.
response (google.cloud.datalabeling_v1beta1.types.ListAnnotationSpecSetsResponse) – The initial response object.
retry (google.api_core.retry.Retry) – Designation of what errors, if any, should be retried.
timeout (float) – The timeout for this request.
metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.
- class google.cloud.datalabeling_v1beta1.services.data_labeling_service.pagers.ListDataItemsAsyncPager(method: Callable[[...], Awaitable[google.cloud.datalabeling_v1beta1.types.data_labeling_service.ListDataItemsResponse]], request: google.cloud.datalabeling_v1beta1.types.data_labeling_service.ListDataItemsRequest, response: google.cloud.datalabeling_v1beta1.types.data_labeling_service.ListDataItemsResponse, *, retry: Optional[Union[google.api_core.retry.retry_unary_async.AsyncRetry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ())[source]¶
A pager for iterating through
list_data_items
requests.This class thinly wraps an initial
google.cloud.datalabeling_v1beta1.types.ListDataItemsResponse
object, and provides an__aiter__
method to iterate through itsdata_items
field.If there are more pages, the
__aiter__
method will make additionalListDataItems
requests and continue to iterate through thedata_items
field on the corresponding responses.All the usual
google.cloud.datalabeling_v1beta1.types.ListDataItemsResponse
attributes are available on the pager. If multiple requests are made, only the most recent response is retained, and thus used for attribute lookup.Instantiates the pager.
- Parameters
method (Callable) – The method that was originally called, and which instantiated this pager.
request (google.cloud.datalabeling_v1beta1.types.ListDataItemsRequest) – The initial request object.
response (google.cloud.datalabeling_v1beta1.types.ListDataItemsResponse) – The initial response object.
retry (google.api_core.retry.AsyncRetry) – Designation of what errors, if any, should be retried.
timeout (float) – The timeout for this request.
metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.
- class google.cloud.datalabeling_v1beta1.services.data_labeling_service.pagers.ListDataItemsPager(method: Callable[[...], google.cloud.datalabeling_v1beta1.types.data_labeling_service.ListDataItemsResponse], request: google.cloud.datalabeling_v1beta1.types.data_labeling_service.ListDataItemsRequest, response: google.cloud.datalabeling_v1beta1.types.data_labeling_service.ListDataItemsResponse, *, retry: Optional[Union[google.api_core.retry.retry_unary.Retry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ())[source]¶
A pager for iterating through
list_data_items
requests.This class thinly wraps an initial
google.cloud.datalabeling_v1beta1.types.ListDataItemsResponse
object, and provides an__iter__
method to iterate through itsdata_items
field.If there are more pages, the
__iter__
method will make additionalListDataItems
requests and continue to iterate through thedata_items
field on the corresponding responses.All the usual
google.cloud.datalabeling_v1beta1.types.ListDataItemsResponse
attributes are available on the pager. If multiple requests are made, only the most recent response is retained, and thus used for attribute lookup.Instantiate the pager.
- Parameters
method (Callable) – The method that was originally called, and which instantiated this pager.
request (google.cloud.datalabeling_v1beta1.types.ListDataItemsRequest) – The initial request object.
response (google.cloud.datalabeling_v1beta1.types.ListDataItemsResponse) – The initial response object.
retry (google.api_core.retry.Retry) – Designation of what errors, if any, should be retried.
timeout (float) – The timeout for this request.
metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.
- class google.cloud.datalabeling_v1beta1.services.data_labeling_service.pagers.ListDatasetsAsyncPager(method: Callable[[...], Awaitable[google.cloud.datalabeling_v1beta1.types.data_labeling_service.ListDatasetsResponse]], request: google.cloud.datalabeling_v1beta1.types.data_labeling_service.ListDatasetsRequest, response: google.cloud.datalabeling_v1beta1.types.data_labeling_service.ListDatasetsResponse, *, retry: Optional[Union[google.api_core.retry.retry_unary_async.AsyncRetry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ())[source]¶
A pager for iterating through
list_datasets
requests.This class thinly wraps an initial
google.cloud.datalabeling_v1beta1.types.ListDatasetsResponse
object, and provides an__aiter__
method to iterate through itsdatasets
field.If there are more pages, the
__aiter__
method will make additionalListDatasets
requests and continue to iterate through thedatasets
field on the corresponding responses.All the usual
google.cloud.datalabeling_v1beta1.types.ListDatasetsResponse
attributes are available on the pager. If multiple requests are made, only the most recent response is retained, and thus used for attribute lookup.Instantiates the pager.
- Parameters
method (Callable) – The method that was originally called, and which instantiated this pager.
request (google.cloud.datalabeling_v1beta1.types.ListDatasetsRequest) – The initial request object.
response (google.cloud.datalabeling_v1beta1.types.ListDatasetsResponse) – The initial response object.
retry (google.api_core.retry.AsyncRetry) – Designation of what errors, if any, should be retried.
timeout (float) – The timeout for this request.
metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.
- class google.cloud.datalabeling_v1beta1.services.data_labeling_service.pagers.ListDatasetsPager(method: Callable[[...], google.cloud.datalabeling_v1beta1.types.data_labeling_service.ListDatasetsResponse], request: google.cloud.datalabeling_v1beta1.types.data_labeling_service.ListDatasetsRequest, response: google.cloud.datalabeling_v1beta1.types.data_labeling_service.ListDatasetsResponse, *, retry: Optional[Union[google.api_core.retry.retry_unary.Retry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ())[source]¶
A pager for iterating through
list_datasets
requests.This class thinly wraps an initial
google.cloud.datalabeling_v1beta1.types.ListDatasetsResponse
object, and provides an__iter__
method to iterate through itsdatasets
field.If there are more pages, the
__iter__
method will make additionalListDatasets
requests and continue to iterate through thedatasets
field on the corresponding responses.All the usual
google.cloud.datalabeling_v1beta1.types.ListDatasetsResponse
attributes are available on the pager. If multiple requests are made, only the most recent response is retained, and thus used for attribute lookup.Instantiate the pager.
- Parameters
method (Callable) – The method that was originally called, and which instantiated this pager.
request (google.cloud.datalabeling_v1beta1.types.ListDatasetsRequest) – The initial request object.
response (google.cloud.datalabeling_v1beta1.types.ListDatasetsResponse) – The initial response object.
retry (google.api_core.retry.Retry) – Designation of what errors, if any, should be retried.
timeout (float) – The timeout for this request.
metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.
- class google.cloud.datalabeling_v1beta1.services.data_labeling_service.pagers.ListEvaluationJobsAsyncPager(method: Callable[[...], Awaitable[google.cloud.datalabeling_v1beta1.types.data_labeling_service.ListEvaluationJobsResponse]], request: google.cloud.datalabeling_v1beta1.types.data_labeling_service.ListEvaluationJobsRequest, response: google.cloud.datalabeling_v1beta1.types.data_labeling_service.ListEvaluationJobsResponse, *, retry: Optional[Union[google.api_core.retry.retry_unary_async.AsyncRetry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ())[source]¶
A pager for iterating through
list_evaluation_jobs
requests.This class thinly wraps an initial
google.cloud.datalabeling_v1beta1.types.ListEvaluationJobsResponse
object, and provides an__aiter__
method to iterate through itsevaluation_jobs
field.If there are more pages, the
__aiter__
method will make additionalListEvaluationJobs
requests and continue to iterate through theevaluation_jobs
field on the corresponding responses.All the usual
google.cloud.datalabeling_v1beta1.types.ListEvaluationJobsResponse
attributes are available on the pager. If multiple requests are made, only the most recent response is retained, and thus used for attribute lookup.Instantiates the pager.
- Parameters
method (Callable) – The method that was originally called, and which instantiated this pager.
request (google.cloud.datalabeling_v1beta1.types.ListEvaluationJobsRequest) – The initial request object.
response (google.cloud.datalabeling_v1beta1.types.ListEvaluationJobsResponse) – The initial response object.
retry (google.api_core.retry.AsyncRetry) – Designation of what errors, if any, should be retried.
timeout (float) – The timeout for this request.
metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.
- class google.cloud.datalabeling_v1beta1.services.data_labeling_service.pagers.ListEvaluationJobsPager(method: Callable[[...], google.cloud.datalabeling_v1beta1.types.data_labeling_service.ListEvaluationJobsResponse], request: google.cloud.datalabeling_v1beta1.types.data_labeling_service.ListEvaluationJobsRequest, response: google.cloud.datalabeling_v1beta1.types.data_labeling_service.ListEvaluationJobsResponse, *, retry: Optional[Union[google.api_core.retry.retry_unary.Retry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ())[source]¶
A pager for iterating through
list_evaluation_jobs
requests.This class thinly wraps an initial
google.cloud.datalabeling_v1beta1.types.ListEvaluationJobsResponse
object, and provides an__iter__
method to iterate through itsevaluation_jobs
field.If there are more pages, the
__iter__
method will make additionalListEvaluationJobs
requests and continue to iterate through theevaluation_jobs
field on the corresponding responses.All the usual
google.cloud.datalabeling_v1beta1.types.ListEvaluationJobsResponse
attributes are available on the pager. If multiple requests are made, only the most recent response is retained, and thus used for attribute lookup.Instantiate the pager.
- Parameters
method (Callable) – The method that was originally called, and which instantiated this pager.
request (google.cloud.datalabeling_v1beta1.types.ListEvaluationJobsRequest) – The initial request object.
response (google.cloud.datalabeling_v1beta1.types.ListEvaluationJobsResponse) – The initial response object.
retry (google.api_core.retry.Retry) – Designation of what errors, if any, should be retried.
timeout (float) – The timeout for this request.
metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.
- class google.cloud.datalabeling_v1beta1.services.data_labeling_service.pagers.ListExamplesAsyncPager(method: Callable[[...], Awaitable[google.cloud.datalabeling_v1beta1.types.data_labeling_service.ListExamplesResponse]], request: google.cloud.datalabeling_v1beta1.types.data_labeling_service.ListExamplesRequest, response: google.cloud.datalabeling_v1beta1.types.data_labeling_service.ListExamplesResponse, *, retry: Optional[Union[google.api_core.retry.retry_unary_async.AsyncRetry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ())[source]¶
A pager for iterating through
list_examples
requests.This class thinly wraps an initial
google.cloud.datalabeling_v1beta1.types.ListExamplesResponse
object, and provides an__aiter__
method to iterate through itsexamples
field.If there are more pages, the
__aiter__
method will make additionalListExamples
requests and continue to iterate through theexamples
field on the corresponding responses.All the usual
google.cloud.datalabeling_v1beta1.types.ListExamplesResponse
attributes are available on the pager. If multiple requests are made, only the most recent response is retained, and thus used for attribute lookup.Instantiates the pager.
- Parameters
method (Callable) – The method that was originally called, and which instantiated this pager.
request (google.cloud.datalabeling_v1beta1.types.ListExamplesRequest) – The initial request object.
response (google.cloud.datalabeling_v1beta1.types.ListExamplesResponse) – The initial response object.
retry (google.api_core.retry.AsyncRetry) – Designation of what errors, if any, should be retried.
timeout (float) – The timeout for this request.
metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.
- class google.cloud.datalabeling_v1beta1.services.data_labeling_service.pagers.ListExamplesPager(method: Callable[[...], google.cloud.datalabeling_v1beta1.types.data_labeling_service.ListExamplesResponse], request: google.cloud.datalabeling_v1beta1.types.data_labeling_service.ListExamplesRequest, response: google.cloud.datalabeling_v1beta1.types.data_labeling_service.ListExamplesResponse, *, retry: Optional[Union[google.api_core.retry.retry_unary.Retry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ())[source]¶
A pager for iterating through
list_examples
requests.This class thinly wraps an initial
google.cloud.datalabeling_v1beta1.types.ListExamplesResponse
object, and provides an__iter__
method to iterate through itsexamples
field.If there are more pages, the
__iter__
method will make additionalListExamples
requests and continue to iterate through theexamples
field on the corresponding responses.All the usual
google.cloud.datalabeling_v1beta1.types.ListExamplesResponse
attributes are available on the pager. If multiple requests are made, only the most recent response is retained, and thus used for attribute lookup.Instantiate the pager.
- Parameters
method (Callable) – The method that was originally called, and which instantiated this pager.
request (google.cloud.datalabeling_v1beta1.types.ListExamplesRequest) – The initial request object.
response (google.cloud.datalabeling_v1beta1.types.ListExamplesResponse) – The initial response object.
retry (google.api_core.retry.Retry) – Designation of what errors, if any, should be retried.
timeout (float) – The timeout for this request.
metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.
- class google.cloud.datalabeling_v1beta1.services.data_labeling_service.pagers.ListInstructionsAsyncPager(method: Callable[[...], Awaitable[google.cloud.datalabeling_v1beta1.types.data_labeling_service.ListInstructionsResponse]], request: google.cloud.datalabeling_v1beta1.types.data_labeling_service.ListInstructionsRequest, response: google.cloud.datalabeling_v1beta1.types.data_labeling_service.ListInstructionsResponse, *, retry: Optional[Union[google.api_core.retry.retry_unary_async.AsyncRetry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ())[source]¶
A pager for iterating through
list_instructions
requests.This class thinly wraps an initial
google.cloud.datalabeling_v1beta1.types.ListInstructionsResponse
object, and provides an__aiter__
method to iterate through itsinstructions
field.If there are more pages, the
__aiter__
method will make additionalListInstructions
requests and continue to iterate through theinstructions
field on the corresponding responses.All the usual
google.cloud.datalabeling_v1beta1.types.ListInstructionsResponse
attributes are available on the pager. If multiple requests are made, only the most recent response is retained, and thus used for attribute lookup.Instantiates the pager.
- Parameters
method (Callable) – The method that was originally called, and which instantiated this pager.
request (google.cloud.datalabeling_v1beta1.types.ListInstructionsRequest) – The initial request object.
response (google.cloud.datalabeling_v1beta1.types.ListInstructionsResponse) – The initial response object.
retry (google.api_core.retry.AsyncRetry) – Designation of what errors, if any, should be retried.
timeout (float) – The timeout for this request.
metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.
- class google.cloud.datalabeling_v1beta1.services.data_labeling_service.pagers.ListInstructionsPager(method: Callable[[...], google.cloud.datalabeling_v1beta1.types.data_labeling_service.ListInstructionsResponse], request: google.cloud.datalabeling_v1beta1.types.data_labeling_service.ListInstructionsRequest, response: google.cloud.datalabeling_v1beta1.types.data_labeling_service.ListInstructionsResponse, *, retry: Optional[Union[google.api_core.retry.retry_unary.Retry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ())[source]¶
A pager for iterating through
list_instructions
requests.This class thinly wraps an initial
google.cloud.datalabeling_v1beta1.types.ListInstructionsResponse
object, and provides an__iter__
method to iterate through itsinstructions
field.If there are more pages, the
__iter__
method will make additionalListInstructions
requests and continue to iterate through theinstructions
field on the corresponding responses.All the usual
google.cloud.datalabeling_v1beta1.types.ListInstructionsResponse
attributes are available on the pager. If multiple requests are made, only the most recent response is retained, and thus used for attribute lookup.Instantiate the pager.
- Parameters
method (Callable) – The method that was originally called, and which instantiated this pager.
request (google.cloud.datalabeling_v1beta1.types.ListInstructionsRequest) – The initial request object.
response (google.cloud.datalabeling_v1beta1.types.ListInstructionsResponse) – The initial response object.
retry (google.api_core.retry.Retry) – Designation of what errors, if any, should be retried.
timeout (float) – The timeout for this request.
metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.
- class google.cloud.datalabeling_v1beta1.services.data_labeling_service.pagers.SearchEvaluationsAsyncPager(method: Callable[[...], Awaitable[google.cloud.datalabeling_v1beta1.types.data_labeling_service.SearchEvaluationsResponse]], request: google.cloud.datalabeling_v1beta1.types.data_labeling_service.SearchEvaluationsRequest, response: google.cloud.datalabeling_v1beta1.types.data_labeling_service.SearchEvaluationsResponse, *, retry: Optional[Union[google.api_core.retry.retry_unary_async.AsyncRetry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ())[source]¶
A pager for iterating through
search_evaluations
requests.This class thinly wraps an initial
google.cloud.datalabeling_v1beta1.types.SearchEvaluationsResponse
object, and provides an__aiter__
method to iterate through itsevaluations
field.If there are more pages, the
__aiter__
method will make additionalSearchEvaluations
requests and continue to iterate through theevaluations
field on the corresponding responses.All the usual
google.cloud.datalabeling_v1beta1.types.SearchEvaluationsResponse
attributes are available on the pager. If multiple requests are made, only the most recent response is retained, and thus used for attribute lookup.Instantiates the pager.
- Parameters
method (Callable) – The method that was originally called, and which instantiated this pager.
request (google.cloud.datalabeling_v1beta1.types.SearchEvaluationsRequest) – The initial request object.
response (google.cloud.datalabeling_v1beta1.types.SearchEvaluationsResponse) – The initial response object.
retry (google.api_core.retry.AsyncRetry) – Designation of what errors, if any, should be retried.
timeout (float) – The timeout for this request.
metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.
- class google.cloud.datalabeling_v1beta1.services.data_labeling_service.pagers.SearchEvaluationsPager(method: Callable[[...], google.cloud.datalabeling_v1beta1.types.data_labeling_service.SearchEvaluationsResponse], request: google.cloud.datalabeling_v1beta1.types.data_labeling_service.SearchEvaluationsRequest, response: google.cloud.datalabeling_v1beta1.types.data_labeling_service.SearchEvaluationsResponse, *, retry: Optional[Union[google.api_core.retry.retry_unary.Retry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ())[source]¶
A pager for iterating through
search_evaluations
requests.This class thinly wraps an initial
google.cloud.datalabeling_v1beta1.types.SearchEvaluationsResponse
object, and provides an__iter__
method to iterate through itsevaluations
field.If there are more pages, the
__iter__
method will make additionalSearchEvaluations
requests and continue to iterate through theevaluations
field on the corresponding responses.All the usual
google.cloud.datalabeling_v1beta1.types.SearchEvaluationsResponse
attributes are available on the pager. If multiple requests are made, only the most recent response is retained, and thus used for attribute lookup.Instantiate the pager.
- Parameters
method (Callable) – The method that was originally called, and which instantiated this pager.
request (google.cloud.datalabeling_v1beta1.types.SearchEvaluationsRequest) – The initial request object.
response (google.cloud.datalabeling_v1beta1.types.SearchEvaluationsResponse) – The initial response object.
retry (google.api_core.retry.Retry) – Designation of what errors, if any, should be retried.
timeout (float) – The timeout for this request.
metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.
- class google.cloud.datalabeling_v1beta1.services.data_labeling_service.pagers.SearchExampleComparisonsAsyncPager(method: Callable[[...], Awaitable[google.cloud.datalabeling_v1beta1.types.data_labeling_service.SearchExampleComparisonsResponse]], request: google.cloud.datalabeling_v1beta1.types.data_labeling_service.SearchExampleComparisonsRequest, response: google.cloud.datalabeling_v1beta1.types.data_labeling_service.SearchExampleComparisonsResponse, *, retry: Optional[Union[google.api_core.retry.retry_unary_async.AsyncRetry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ())[source]¶
A pager for iterating through
search_example_comparisons
requests.This class thinly wraps an initial
google.cloud.datalabeling_v1beta1.types.SearchExampleComparisonsResponse
object, and provides an__aiter__
method to iterate through itsexample_comparisons
field.If there are more pages, the
__aiter__
method will make additionalSearchExampleComparisons
requests and continue to iterate through theexample_comparisons
field on the corresponding responses.All the usual
google.cloud.datalabeling_v1beta1.types.SearchExampleComparisonsResponse
attributes are available on the pager. If multiple requests are made, only the most recent response is retained, and thus used for attribute lookup.Instantiates the pager.
- Parameters
method (Callable) – The method that was originally called, and which instantiated this pager.
request (google.cloud.datalabeling_v1beta1.types.SearchExampleComparisonsRequest) – The initial request object.
response (google.cloud.datalabeling_v1beta1.types.SearchExampleComparisonsResponse) – The initial response object.
retry (google.api_core.retry.AsyncRetry) – Designation of what errors, if any, should be retried.
timeout (float) – The timeout for this request.
metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.
- class google.cloud.datalabeling_v1beta1.services.data_labeling_service.pagers.SearchExampleComparisonsPager(method: Callable[[...], google.cloud.datalabeling_v1beta1.types.data_labeling_service.SearchExampleComparisonsResponse], request: google.cloud.datalabeling_v1beta1.types.data_labeling_service.SearchExampleComparisonsRequest, response: google.cloud.datalabeling_v1beta1.types.data_labeling_service.SearchExampleComparisonsResponse, *, retry: Optional[Union[google.api_core.retry.retry_unary.Retry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ())[source]¶
A pager for iterating through
search_example_comparisons
requests.This class thinly wraps an initial
google.cloud.datalabeling_v1beta1.types.SearchExampleComparisonsResponse
object, and provides an__iter__
method to iterate through itsexample_comparisons
field.If there are more pages, the
__iter__
method will make additionalSearchExampleComparisons
requests and continue to iterate through theexample_comparisons
field on the corresponding responses.All the usual
google.cloud.datalabeling_v1beta1.types.SearchExampleComparisonsResponse
attributes are available on the pager. If multiple requests are made, only the most recent response is retained, and thus used for attribute lookup.Instantiate the pager.
- Parameters
method (Callable) – The method that was originally called, and which instantiated this pager.
request (google.cloud.datalabeling_v1beta1.types.SearchExampleComparisonsRequest) – The initial request object.
response (google.cloud.datalabeling_v1beta1.types.SearchExampleComparisonsResponse) – The initial response object.
retry (google.api_core.retry.Retry) – Designation of what errors, if any, should be retried.
timeout (float) – The timeout for this request.
metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.