AutoMlAsyncClient(*, credentials: typing.Optional[google.auth.credentials.Credentials] = None, transport: typing.Union[str, google.cloud.automl_v1beta1.services.auto_ml.transports.base.AutoMlTransport] = '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>)
AutoML Server API.
The resource names are assigned by the server. The server never reuses names that it has created after the resources with those names are deleted.
An ID of a resource is the last element of the item's resource name.
For
projects/{project_id}/locations/{location_id}/datasets/{dataset_id}
,
then the id for the item is {dataset_id}
.
Currently the only supported location_id
is "us-central1".
On any input that is documented to expect a string parameter in snake_case or kebab-case, either of those cases is accepted.
Properties
transport
Returns the transport used by the client instance.
Returns | |
---|---|
Type | Description |
AutoMlTransport | The transport used by the client instance. |
Methods
AutoMlAsyncClient
AutoMlAsyncClient(*, credentials: typing.Optional[google.auth.credentials.Credentials] = None, transport: typing.Union[str, google.cloud.automl_v1beta1.services.auto_ml.transports.base.AutoMlTransport] = '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>)
Instantiates the auto ml client.
Parameters | |
---|---|
Name | Description |
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 |
Union[str,
The transport to use. If set to None, a transport is chosen automatically. |
client_options |
ClientOptions
Custom options for the client. It won't take effect if a |
Exceptions | |
---|---|
Type | Description |
google.auth.exceptions.MutualTlsChannelError | If mutual TLS transport creation failed for any reason. |
annotation_spec_path
annotation_spec_path(
project: str, location: str, dataset: str, annotation_spec: str
) -> str
Returns a fully-qualified annotation_spec string.
column_spec_path
column_spec_path(
project: str, location: str, dataset: str, table_spec: str, column_spec: str
) -> str
Returns a fully-qualified column_spec string.
common_billing_account_path
common_billing_account_path(billing_account: str) -> str
Returns a fully-qualified billing_account string.
common_folder_path
common_folder_path(folder: str) -> str
Returns a fully-qualified folder string.
common_location_path
common_location_path(project: str, location: str) -> str
Returns a fully-qualified location string.
common_organization_path
common_organization_path(organization: str) -> str
Returns a fully-qualified organization string.
common_project_path
common_project_path(project: str) -> str
Returns a fully-qualified project string.
create_dataset
create_dataset(
request: typing.Optional[
typing.Union[
google.cloud.automl_v1beta1.types.service.CreateDatasetRequest, dict
]
] = None,
*,
parent: typing.Optional[str] = None,
dataset: typing.Optional[google.cloud.automl_v1beta1.types.dataset.Dataset] = None,
retry: typing.Union[
google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> google.cloud.automl_v1beta1.types.dataset.Dataset
Creates a 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 automl_v1beta1
async def sample_create_dataset():
# Create a client
client = automl_v1beta1.AutoMlAsyncClient()
# Initialize request argument(s)
dataset = automl_v1beta1.Dataset()
dataset.translation_dataset_metadata.source_language_code = "source_language_code_value"
dataset.translation_dataset_metadata.target_language_code = "target_language_code_value"
request = automl_v1beta1.CreateDatasetRequest(
parent="parent_value",
dataset=dataset,
)
# Make the request
response = await client.create_dataset(request=request)
# Handle the response
print(response)
Parameters | |
---|---|
Name | Description |
request |
Optional[Union[google.cloud.automl_v1beta1.types.CreateDatasetRequest, dict]]
The request object. Request message for AutoMl.CreateDataset. |
parent |
Required. The resource name of the project to create the dataset for. This corresponds to the |
dataset |
Dataset
Required. The dataset to create. This corresponds to the |
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 | |
---|---|
Type | Description |
google.cloud.automl_v1beta1.types.Dataset | A workspace for solving a single, particular machine learning (ML) problem. A workspace contains examples that may be annotated. |
create_model
create_model(
request: typing.Optional[
typing.Union[google.cloud.automl_v1beta1.types.service.CreateModelRequest, dict]
] = None,
*,
parent: typing.Optional[str] = None,
model: typing.Optional[google.cloud.automl_v1beta1.types.model.Model] = None,
retry: typing.Union[
google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> google.api_core.operation_async.AsyncOperation
Creates a model. Returns a Model in the
response][google.longrunning.Operation.response]
field when it
completes. When you create a model, several model evaluations
are created for it: a global evaluation, and one evaluation for
each annotation spec.
# 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 automl_v1beta1
async def sample_create_model():
# Create a client
client = automl_v1beta1.AutoMlAsyncClient()
# Initialize request argument(s)
request = automl_v1beta1.CreateModelRequest(
parent="parent_value",
)
# Make the request
operation = client.create_model(request=request)
print("Waiting for operation to complete...")
response = (await operation).result()
# Handle the response
print(response)
Parameters | |
---|---|
Name | Description |
request |
Optional[Union[google.cloud.automl_v1beta1.types.CreateModelRequest, dict]]
The request object. Request message for AutoMl.CreateModel. |
parent |
Required. Resource name of the parent project where the model is being created. This corresponds to the |
model |
Model
Required. The model to create. This corresponds to the |
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 | |
---|---|
Type | Description |
google.api_core.operation_async.AsyncOperation | An object representing a long-running operation. The result type for the operation will be Model API proto representing a trained machine learning model. |
dataset_path
dataset_path(project: str, location: str, dataset: str) -> str
Returns a fully-qualified dataset string.
delete_dataset
delete_dataset(
request: typing.Optional[
typing.Union[
google.cloud.automl_v1beta1.types.service.DeleteDatasetRequest, dict
]
] = None,
*,
name: typing.Optional[str] = None,
retry: typing.Union[
google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> google.api_core.operation_async.AsyncOperation
Deletes a dataset and all of its contents. Returns empty
response in the
response][google.longrunning.Operation.response]
field when it
completes, and delete_details
in the
metadata][google.longrunning.Operation.metadata]
field.
# 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 automl_v1beta1
async def sample_delete_dataset():
# Create a client
client = automl_v1beta1.AutoMlAsyncClient()
# Initialize request argument(s)
request = automl_v1beta1.DeleteDatasetRequest(
name="name_value",
)
# Make the request
operation = client.delete_dataset(request=request)
print("Waiting for operation to complete...")
response = (await operation).result()
# Handle the response
print(response)
Parameters | |
---|---|
Name | Description |
request |
Optional[Union[google.cloud.automl_v1beta1.types.DeleteDatasetRequest, dict]]
The request object. Request message for AutoMl.DeleteDataset. |
name |
Required. The resource name of the dataset to delete. This corresponds to the |
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 | |
---|---|
Type | Description |
google.api_core.operation_async.AsyncOperation | An object representing a long-running operation. The result type for the operation will be google.protobuf.empty_pb2.Empty A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } |
delete_model
delete_model(
request: typing.Optional[
typing.Union[google.cloud.automl_v1beta1.types.service.DeleteModelRequest, dict]
] = None,
*,
name: typing.Optional[str] = None,
retry: typing.Union[
google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> google.api_core.operation_async.AsyncOperation
Deletes a model. Returns google.protobuf.Empty
in the
response][google.longrunning.Operation.response]
field when it
completes, and delete_details
in the
metadata][google.longrunning.Operation.metadata]
field.
# 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 automl_v1beta1
async def sample_delete_model():
# Create a client
client = automl_v1beta1.AutoMlAsyncClient()
# Initialize request argument(s)
request = automl_v1beta1.DeleteModelRequest(
name="name_value",
)
# Make the request
operation = client.delete_model(request=request)
print("Waiting for operation to complete...")
response = (await operation).result()
# Handle the response
print(response)
Parameters | |
---|---|
Name | Description |
request |
Optional[Union[google.cloud.automl_v1beta1.types.DeleteModelRequest, dict]]
The request object. Request message for AutoMl.DeleteModel. |
name |
Required. Resource name of the model being deleted. This corresponds to the |
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 | |
---|---|
Type | Description |
google.api_core.operation_async.AsyncOperation | An object representing a long-running operation. The result type for the operation will be google.protobuf.empty_pb2.Empty A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } |
deploy_model
deploy_model(
request: typing.Optional[
typing.Union[google.cloud.automl_v1beta1.types.service.DeployModelRequest, dict]
] = None,
*,
name: typing.Optional[str] = None,
retry: typing.Union[
google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> google.api_core.operation_async.AsyncOperation
Deploys a model. If a model is already deployed, deploying it with the same parameters has no effect. Deploying with different parametrs (as e.g. changing
xref_node_number) will reset the deployment state without pausing the model's availability.
Only applicable for Text Classification, Image Object Detection , Tables, and Image Segmentation; all other domains manage deployment automatically.
Returns an empty response in the
response][google.longrunning.Operation.response]
field when it
completes.
# 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 automl_v1beta1
async def sample_deploy_model():
# Create a client
client = automl_v1beta1.AutoMlAsyncClient()
# Initialize request argument(s)
request = automl_v1beta1.DeployModelRequest(
name="name_value",
)
# Make the request
operation = client.deploy_model(request=request)
print("Waiting for operation to complete...")
response = (await operation).result()
# Handle the response
print(response)
Parameters | |
---|---|
Name | Description |
request |
Optional[Union[google.cloud.automl_v1beta1.types.DeployModelRequest, dict]]
The request object. Request message for AutoMl.DeployModel. |
name |
Required. Resource name of the model to deploy. This corresponds to the |
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 | |
---|---|
Type | Description |
google.api_core.operation_async.AsyncOperation | An object representing a long-running operation. The result type for the operation will be google.protobuf.empty_pb2.Empty A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } |
export_data
export_data(
request: typing.Optional[
typing.Union[google.cloud.automl_v1beta1.types.service.ExportDataRequest, dict]
] = None,
*,
name: typing.Optional[str] = None,
output_config: typing.Optional[
google.cloud.automl_v1beta1.types.io.OutputConfig
] = None,
retry: typing.Union[
google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> google.api_core.operation_async.AsyncOperation
Exports dataset's data to the provided output location. Returns
an empty response in the
response][google.longrunning.Operation.response]
field when it
completes.
# 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 automl_v1beta1
async def sample_export_data():
# Create a client
client = automl_v1beta1.AutoMlAsyncClient()
# Initialize request argument(s)
request = automl_v1beta1.ExportDataRequest(
name="name_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 | |
---|---|
Name | Description |
request |
Optional[Union[google.cloud.automl_v1beta1.types.ExportDataRequest, dict]]
The request object. Request message for AutoMl.ExportData. |
name |
Required. The resource name of the dataset. This corresponds to the |
output_config |
OutputConfig
Required. The desired output location. This corresponds to the |
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 | |
---|---|
Type | Description |
google.api_core.operation_async.AsyncOperation | An object representing a long-running operation. The result type for the operation will be google.protobuf.empty_pb2.Empty A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } |
export_evaluated_examples
export_evaluated_examples(
request: typing.Optional[
typing.Union[
google.cloud.automl_v1beta1.types.service.ExportEvaluatedExamplesRequest,
dict,
]
] = None,
*,
name: typing.Optional[str] = None,
output_config: typing.Optional[
google.cloud.automl_v1beta1.types.io.ExportEvaluatedExamplesOutputConfig
] = None,
retry: typing.Union[
google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> google.api_core.operation_async.AsyncOperation
Exports examples on which the model was evaluated (i.e. which were in the TEST set of the dataset the model was created from), together with their ground truth annotations and the annotations created (predicted) by the model. The examples, ground truth and predictions are exported in the state they were at the moment the model was evaluated.
This export is available only for 30 days since the model evaluation is created.
Currently only available for Tables.
Returns an empty response in the
response][google.longrunning.Operation.response]
field when it
completes.
# 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 automl_v1beta1
async def sample_export_evaluated_examples():
# Create a client
client = automl_v1beta1.AutoMlAsyncClient()
# Initialize request argument(s)
request = automl_v1beta1.ExportEvaluatedExamplesRequest(
name="name_value",
)
# Make the request
operation = client.export_evaluated_examples(request=request)
print("Waiting for operation to complete...")
response = (await operation).result()
# Handle the response
print(response)
Parameters | |
---|---|
Name | Description |
request |
Optional[Union[google.cloud.automl_v1beta1.types.ExportEvaluatedExamplesRequest, dict]]
The request object. Request message for AutoMl.ExportEvaluatedExamples. |
name |
Required. The resource name of the model whose evaluated examples are to be exported. This corresponds to the |
output_config |
ExportEvaluatedExamplesOutputConfig
Required. The desired output location and configuration. This corresponds to the |
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 | |
---|---|
Type | Description |
google.api_core.operation_async.AsyncOperation | An object representing a long-running operation. The result type for the operation will be google.protobuf.empty_pb2.Empty A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } |
export_model
export_model(
request: typing.Optional[
typing.Union[google.cloud.automl_v1beta1.types.service.ExportModelRequest, dict]
] = None,
*,
name: typing.Optional[str] = None,
output_config: typing.Optional[
google.cloud.automl_v1beta1.types.io.ModelExportOutputConfig
] = None,
retry: typing.Union[
google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> google.api_core.operation_async.AsyncOperation
Exports a trained, "export-able", model to a user specified Google Cloud Storage location. A model is considered export-able if and only if it has an export format defined for it in
xref_ModelExportOutputConfig.
Returns an empty response in the
response][google.longrunning.Operation.response]
field when it
completes.
# 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 automl_v1beta1
async def sample_export_model():
# Create a client
client = automl_v1beta1.AutoMlAsyncClient()
# Initialize request argument(s)
request = automl_v1beta1.ExportModelRequest(
name="name_value",
)
# Make the request
operation = client.export_model(request=request)
print("Waiting for operation to complete...")
response = (await operation).result()
# Handle the response
print(response)
Parameters | |
---|---|
Name | Description |
request |
Optional[Union[google.cloud.automl_v1beta1.types.ExportModelRequest, dict]]
The request object. Request message for AutoMl.ExportModel. Models need to be enabled for exporting, otherwise an error code will be returned. |
name |
Required. The resource name of the model to export. This corresponds to the |
output_config |
ModelExportOutputConfig
Required. The desired output location and configuration. This corresponds to the |
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 | |
---|---|
Type | Description |
google.api_core.operation_async.AsyncOperation | An object representing a long-running operation. The result type for the operation will be google.protobuf.empty_pb2.Empty A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } |
from_service_account_file
from_service_account_file(filename: str, *args, **kwargs)
Creates an instance of this client using the provided credentials file.
Parameter | |
---|---|
Name | Description |
filename |
str
The path to the service account private key json file. |
Returns | |
---|---|
Type | Description |
AutoMlAsyncClient | The constructed client. |
from_service_account_info
from_service_account_info(info: dict, *args, **kwargs)
Creates an instance of this client using the provided credentials info.
Parameter | |
---|---|
Name | Description |
info |
dict
The service account private key info. |
Returns | |
---|---|
Type | Description |
AutoMlAsyncClient | The constructed client. |
from_service_account_json
from_service_account_json(filename: str, *args, **kwargs)
Creates an instance of this client using the provided credentials file.
Parameter | |
---|---|
Name | Description |
filename |
str
The path to the service account private key json file. |
Returns | |
---|---|
Type | Description |
AutoMlAsyncClient | The constructed client. |
get_annotation_spec
get_annotation_spec(
request: typing.Optional[
typing.Union[
google.cloud.automl_v1beta1.types.service.GetAnnotationSpecRequest, dict
]
] = None,
*,
name: typing.Optional[str] = None,
retry: typing.Union[
google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> google.cloud.automl_v1beta1.types.annotation_spec.AnnotationSpec
Gets an annotation spec.
# 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 automl_v1beta1
async def sample_get_annotation_spec():
# Create a client
client = automl_v1beta1.AutoMlAsyncClient()
# Initialize request argument(s)
request = automl_v1beta1.GetAnnotationSpecRequest(
name="name_value",
)
# Make the request
response = await client.get_annotation_spec(request=request)
# Handle the response
print(response)
Parameters | |
---|---|
Name | Description |
request |
Optional[Union[google.cloud.automl_v1beta1.types.GetAnnotationSpecRequest, dict]]
The request object. Request message for AutoMl.GetAnnotationSpec. |
name |
Required. The resource name of the annotation spec to retrieve. This corresponds to the |
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 | |
---|---|
Type | Description |
google.cloud.automl_v1beta1.types.AnnotationSpec | A definition of an annotation spec. |
get_column_spec
get_column_spec(
request: typing.Optional[
typing.Union[
google.cloud.automl_v1beta1.types.service.GetColumnSpecRequest, dict
]
] = None,
*,
name: typing.Optional[str] = None,
retry: typing.Union[
google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> google.cloud.automl_v1beta1.types.column_spec.ColumnSpec
Gets a column spec.
# 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 automl_v1beta1
async def sample_get_column_spec():
# Create a client
client = automl_v1beta1.AutoMlAsyncClient()
# Initialize request argument(s)
request = automl_v1beta1.GetColumnSpecRequest(
name="name_value",
)
# Make the request
response = await client.get_column_spec(request=request)
# Handle the response
print(response)
Parameters | |
---|---|
Name | Description |
request |
Optional[Union[google.cloud.automl_v1beta1.types.GetColumnSpecRequest, dict]]
The request object. Request message for AutoMl.GetColumnSpec. |
name |
Required. The resource name of the column spec to retrieve. This corresponds to the |
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 | |
---|---|
Type | Description |
google.cloud.automl_v1beta1.types.ColumnSpec | A representation of a column in a relational table. When listing them, column specs are returned in the same order in which they were given on import . Used by: \* Tables |
get_dataset
get_dataset(
request: typing.Optional[
typing.Union[google.cloud.automl_v1beta1.types.service.GetDatasetRequest, dict]
] = None,
*,
name: typing.Optional[str] = None,
retry: typing.Union[
google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> google.cloud.automl_v1beta1.types.dataset.Dataset
Gets a 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 automl_v1beta1
async def sample_get_dataset():
# Create a client
client = automl_v1beta1.AutoMlAsyncClient()
# Initialize request argument(s)
request = automl_v1beta1.GetDatasetRequest(
name="name_value",
)
# Make the request
response = await client.get_dataset(request=request)
# Handle the response
print(response)
Parameters | |
---|---|
Name | Description |
request |
Optional[Union[google.cloud.automl_v1beta1.types.GetDatasetRequest, dict]]
The request object. Request message for AutoMl.GetDataset. |
name |
Required. The resource name of the dataset to retrieve. This corresponds to the |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |