Enumerations

ClassificationType

constant   static

number

Type of the classification problem.

Value

CLASSIFICATION_TYPE_UNSPECIFIED

Should not be used, an un-set enum has this value by default.

MULTICLASS

At most one label is allowed per example.

MULTILABEL

Multiple labels are allowed for one example.

DeploymentState

static

number

Deployment state of the model.

Value

DEPLOYMENT_STATE_UNSPECIFIED

Should not be used, an un-set enum has this value by default.

DEPLOYED

Model is deployed.

UNDEPLOYED

Model is not deployed.

Properties

ClassificationType

constant   static

number

Type of the classification problem.

Value

CLASSIFICATION_TYPE_UNSPECIFIED

Should not be used, an un-set enum has this value by default.

MULTICLASS

At most one label is allowed per example.

MULTILABEL

Multiple labels are allowed for one example.

DeploymentState

static

number

Deployment state of the model.

Value

DEPLOYMENT_STATE_UNSPECIFIED

Should not be used, an un-set enum has this value by default.

DEPLOYED

Model is deployed.

UNDEPLOYED

Model is not deployed.

Abstract types

AnnotationPayload

static

Contains annotation information that is relevant to AutoML.

Properties

Parameter

translation

Object

Annotation details for translation.

This object should have the same structure as TranslationAnnotation

classification

Object

Annotation details for content or image classification.

This object should have the same structure as ClassificationAnnotation

annotationSpecId

string

Output only . The resource ID of the annotation spec that this annotation pertains to. The annotation spec comes from either an ancestor dataset, or the dataset that was used to train the model in use.

displayName

string

Output only. The value of AnnotationSpec.display_name when the model was trained. Because this field returns a value at model training time, for different models trained using the same dataset, the returned value could be different as model owner could update the display_name between any two model training.

See also

google.cloud.automl.v1beta1.AnnotationPayload definition in proto format

ClassificationAnnotation

static

Contains annotation details specific to classification.

Property

Parameter

score

number

Output only. A confidence estimate between 0.0 and 1.0. A higher value means greater confidence that the annotation is positive. If a user approves an annotation as negative or positive, the score value remains unchanged. If a user creates an annotation, the score is 0 for negative or 1 for positive.

See also

google.cloud.automl.v1beta1.ClassificationAnnotation definition in proto format

ClassificationEvaluationMetrics

static

Model evaluation metrics for classification problems. Visible only to v1beta1

Properties

Parameter

auPrc

number

Output only. The Area under precision recall curve metric.

baseAuPrc

number

Output only. The Area under precision recall curve metric based on priors.

confidenceMetricsEntry

Array of Object

Output only. Metrics that have confidence thresholds. Precision-recall curve can be derived from it.

This object should have the same structure as ConfidenceMetricsEntry

confusionMatrix

Object

Output only. Confusion matrix of the evaluation. Only set for MULTICLASS classification problems where number of labels is no more than 10. Only set for model level evaluation, not for evaluation per label.

This object should have the same structure as ConfusionMatrix

annotationSpecId

Array of string

Output only. The annotation spec ids used for this evaluation.

See also

google.cloud.automl.v1beta1.ClassificationEvaluationMetrics definition in proto format

ConfidenceMetricsEntry

static

Metrics for a single confidence threshold.

Properties

Parameter

confidenceThreshold

number

Output only. The confidence threshold value used to compute the metrics.

recall

number

Output only. Recall under the given confidence threshold.

precision

number

Output only. Precision under the given confidence threshold.

f1Score

number

Output only. The harmonic mean of recall and precision.

recallAt1

number

Output only. The recall when only considering the label that has the highest prediction score and not below the confidence threshold for each example.

precisionAt1

number

Output only. The precision when only considering the label that has the highest predictionscore and not below the confidence threshold for each example.

f1ScoreAt1

number

Output only. The harmonic mean of recall_at1 and precision_at1.

See also

google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry definition in proto format

ConfusionMatrix

static

Confusion matrix of the model running the classification.

Properties

Parameter

annotationSpecId

Array of string

Output only. IDs of the annotation specs used in the confusion matrix.

row

Array of Object

Output only. Rows in the confusion matrix. The number of rows is equal to the size of annotation_spec_id. row[i].value[j] is the number of examples that have ground truth of the annotation_spec_id[i] and are predicted as annotation_spec_id[j] by the model being evaluated.

This object should have the same structure as Row

See also

google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix definition in proto format

CreateDatasetRequest

static

Request message for AutoMl.CreateDataset.

Properties

Parameter

parent

string

The resource name of the project to create the dataset for.

dataset

Object

The dataset to create.

This object should have the same structure as Dataset

See also

google.cloud.automl.v1beta1.CreateDatasetRequest definition in proto format

CreateModelRequest

static

Request message for AutoMl.CreateModel.

Properties

Parameter

parent

string

Resource name of the parent project where the model is being created.

model

Object

The model to create.

This object should have the same structure as Model

See also

google.cloud.automl.v1beta1.CreateModelRequest definition in proto format

Dataset

static

A workspace for solving a single, particular machine learning (ML) problem. A workspace contains examples that may be annotated.

Properties

Parameter

translationDatasetMetadata

Object

Metadata for a dataset used for translation.

This object should have the same structure as TranslationDatasetMetadata

imageClassificationDatasetMetadata

Object

Metadata for a dataset used for image classification.

This object should have the same structure as ImageClassificationDatasetMetadata

textClassificationDatasetMetadata

Object

Metadata for a dataset used for text classification.

This object should have the same structure as TextClassificationDatasetMetadata

name

string

Output only. The resource name of the dataset. Form: projects/{project_id}/locations/{location_id}/datasets/{dataset_id}

displayName

string

Required. The name of the dataset to show in the interface. The name can be up to 32 characters long and can consist only of ASCII Latin letters A-Z and a-z, underscores (_), and ASCII digits 0-9.

exampleCount

number

Output only. The number of examples in the dataset.

createTime

Object

Output only. Timestamp when this dataset was created.

This object should have the same structure as Timestamp

See also

google.cloud.automl.v1beta1.Dataset definition in proto format

DeleteDatasetRequest

static

Request message for AutoMl.DeleteDataset.

Property

Parameter

name

string

The resource name of the dataset to delete.

See also

google.cloud.automl.v1beta1.DeleteDatasetRequest definition in proto format

DeleteModelRequest

static

Request message for AutoMl.DeleteModel.

Property

Parameter

name

string

Resource name of the model being deleted.

See also

google.cloud.automl.v1beta1.DeleteModelRequest definition in proto format

DeployModelRequest

static

Request message for AutoMl.DeployModel.

Property

Parameter

name

string

Resource name of the model to deploy.

See also

google.cloud.automl.v1beta1.DeployModelRequest definition in proto format

ExamplePayload

static

Example data used for training or prediction.

Properties

Parameter

image

Object

An example image.

This object should have the same structure as Image

textSnippet

Object

Example text.

This object should have the same structure as TextSnippet

See also

google.cloud.automl.v1beta1.ExamplePayload definition in proto format

ExportDataRequest

static

Request message for AutoMl.ExportData.

Properties

Parameter

name

string

Required. The resource name of the dataset.

outputConfig

Object

Required. The desired output location.

This object should have the same structure as OutputConfig

See also

google.cloud.automl.v1beta1.ExportDataRequest definition in proto format

GcsDestination

static

The GCS location where the output must be written to

Property

Parameter

outputUriPrefix

string

Required. Google Cloud Storage URI to output directory, up to 2000 characters long. Accepted forms:

  • Prefix path: gs://bucket/directory The requesting user must have write permission to the bucket. The directory is created if it doesn't exist.
See also

google.cloud.automl.v1beta1.GcsDestination definition in proto format

GcsSource

static

The GCS location for the input content.

Property

Parameter

inputUris

Array of string

Required. Google Cloud Storage URIs to input files, up to 2000 characters long. Accepted forms:

  • Full object path: gs://bucket/directory/object.csv
See also

google.cloud.automl.v1beta1.GcsSource definition in proto format

GetDatasetRequest

static

Request message for AutoMl.GetDataset.

Property

Parameter

name

string

The resource name of the dataset to retrieve.

See also

google.cloud.automl.v1beta1.GetDatasetRequest definition in proto format

GetModelEvaluationRequest

static

Request message for AutoMl.GetModelEvaluation.

Property

Parameter

name

string

Resource name for the model evaluation.

See also

google.cloud.automl.v1beta1.GetModelEvaluationRequest definition in proto format

GetModelRequest

static

Request message for AutoMl.GetModel.

Property

Parameter

name

string

Resource name of the model.

See also

google.cloud.automl.v1beta1.GetModelRequest definition in proto format

Image

static

A representation of an image.

Properties

Parameter

imageBytes

string

Image content represented as a stream of bytes. Note: As with all bytes fields, protobuffers use a pure binary representation, whereas JSON representations use base64.

inputConfig

Object

An input config specifying the content of the image.

This object should have the same structure as InputConfig

thumbnailUri

string

Output only. HTTP URI to the thumbnail image.

See also

google.cloud.automl.v1beta1.Image definition in proto format

ImageClassificationDatasetMetadata

static

Dataset metadata that is specific to image classification.

Property

Parameter

classificationType

number

Required. Type of the classification problem.

The number should be among the values of ClassificationType

See also

google.cloud.automl.v1beta1.ImageClassificationDatasetMetadata definition in proto format

ImageClassificationModelMetadata

static

Model metadata for image classification.

Properties

Parameter

baseModelId

string

Optional. The ID of the base model. If it is specified, the new model will be created based on the base model. Otherwise, the new model will be created from scratch. The base model is expected to be in the same project and location as the new model to create.

trainBudget

number

Required. The train budget of creating this model. The actual train_cost will be equal or less than this value.

trainCost

number

Output only. The actual train cost of creating this model. If this model is created from a base model, the train cost used to create the base model are not included.

stopReason

string

Output only. The reason that this create model operation stopped, e.g. BUDGET_REACHED, CONVERGED.

See also

google.cloud.automl.v1beta1.ImageClassificationModelMetadata definition in proto format

ImportDataRequest

static

Request message for AutoMl.ImportData.

Properties

Parameter

name

string

Required. Dataset name. Dataset must already exist. All imported annotations and examples will be added.

inputConfig

Object

Required. The desired input location.

This object should have the same structure as InputConfig

See also

google.cloud.automl.v1beta1.ImportDataRequest definition in proto format

InputConfig

static

Input configuration.

Property

Parameter

gcsSource

Object

The GCS location for the input content.

This object should have the same structure as GcsSource

See also

google.cloud.automl.v1beta1.InputConfig definition in proto format

ListDatasetsRequest

static

Request message for AutoMl.ListDatasets.

Properties

Parameter

parent

string

The resource name of the project from which to list datasets.

filter

string

An expression for filtering the results of the request.

* `dataset_metadata` - for existence of the case.

An example of using the filter is:

* `translation_dataset_metadata:*` --> The dataset has
                                       translation_dataset_metadata.

pageSize

number

Requested page size. Server may return fewer results than requested. If unspecified, server will pick a default size.

pageToken

string

A token identifying a page of results for the server to return Typically obtained via ListDatasetsResponse.next_page_token of the previous AutoMl.ListDatasets call.

See also

google.cloud.automl.v1beta1.ListDatasetsRequest definition in proto format

ListDatasetsResponse

static

Response message for AutoMl.ListDatasets.

Properties

Parameter

datasets

Array of Object

The datasets read.

This object should have the same structure as Dataset

nextPageToken

string

A token to retrieve next page of results. Pass to ListDatasetsRequest.page_token to obtain that page.

See also

google.cloud.automl.v1beta1.ListDatasetsResponse definition in proto format

ListModelEvaluationsRequest

static

Request message for AutoMl.ListModelEvaluations.

Properties

Parameter

parent

string

Resource name of the model to list the model evaluations for. If modelId is set as "-", this will list model evaluations from across all models of the parent location.

filter

string

An expression for filtering the results of the request.

* `annotation_spec_id` - for =, !=  or existence. See example below for
                       the last.

Some examples of using the filter are:

* `annotation_spec_id!=4` --> The model evaluation was done for
                          annotation spec with ID different than 4.
* `NOT annotation_spec_id:*` --> The model evaluation was done for
                             aggregate of all annotation specs.

pageSize

number

Requested page size.

pageToken

string

A token identifying a page of results for the server to return. Typically obtained via ListModelEvaluationsResponse.next_page_token of the previous AutoMl.ListModelEvaluations call.

See also

google.cloud.automl.v1beta1.ListModelEvaluationsRequest definition in proto format

ListModelEvaluationsResponse

static

Response message for AutoMl.ListModelEvaluations.

Properties

Parameter

modelEvaluation

Array of Object

List of model evaluations in the requested page.

This object should have the same structure as ModelEvaluation

nextPageToken

string

A token to retrieve next page of results. Pass to ListModelEvaluations.page_token to obtain that page.

See also

google.cloud.automl.v1beta1.ListModelEvaluationsResponse definition in proto format

ListModelsRequest

static

Request message for AutoMl.ListModels.

Properties

Parameter

parent

string

Resource name of the project, from which to list the models.

filter

string

An expression for filtering the results of the request.

* `model_metadata` - for existence of the case.
* `dataset_id` - for = or !=.

Some examples of using the filter are:

* `image_classification_model_metadata:*` --> The model has
                                     image_classification_model_metadata.
* `dataset_id=5` --> The model was created from a sibling dataset with
                 ID 5.

pageSize

number

Requested page size.

pageToken

string

A token identifying a page of results for the server to return Typically obtained via ListModelsResponse.next_page_token of the previous AutoMl.ListModels call.

See also

google.cloud.automl.v1beta1.ListModelsRequest definition in proto format

ListModelsResponse

static

Response message for AutoMl.ListModels.

Properties

Parameter

model

Array of Object

List of models in the requested page.

This object should have the same structure as Model

nextPageToken

string

A token to retrieve next page of results. Pass to ListModels.page_token to obtain that page.

See also

google.cloud.automl.v1beta1.ListModelsResponse definition in proto format

Model

static

API proto representing a trained machine learning model.

Properties

Parameter

imageClassificationModelMetadata

Object

Metadata for image classification models.

This object should have the same structure as ImageClassificationModelMetadata

textClassificationModelMetadata

Object

Metadata for text classification models.

This object should have the same structure as TextClassificationModelMetadata

translationModelMetadata

Object

Metadata for translation models.

This object should have the same structure as TranslationModelMetadata

name

string

Output only. Resource name of the model. Format: projects/{project_id}/locations/{location_id}/models/{model_id}

displayName

string

Required. The name of the model to show in the interface. The name can be up to 32 characters long and can consist only of ASCII Latin letters A-Z and a-z, underscores (_), and ASCII digits 0-9.

datasetId

string

Required. The resource ID of the dataset used to create the model. The dataset must come from the same ancestor project and location.

createTime

Object

Output only. Timestamp when this model was created.

This object should have the same structure as Timestamp

updateTime

Object

Output only. Timestamp when this model was last updated.

This object should have the same structure as Timestamp

deploymentState

number

Output only. Deployment state of the model.

The number should be among the values of DeploymentState

See also

google.cloud.automl.v1beta1.Model definition in proto format

ModelEvaluation

static

Evaluation results of a model.

Properties

Parameter

classificationEvaluationMetrics

Object

Evaluation metrics for models on classification problems models.

This object should have the same structure as ClassificationEvaluationMetrics

translationEvaluationMetrics

Object

Evaluation metrics for models on translation models.

This object should have the same structure as TranslationEvaluationMetrics

name

string

Output only. Resource name of the model evaluation. Format:

projects/{project_id}/locations/{location_id}/models/{model_id}/modelEvaluations/{model_evaluation_id}

annotationSpecId

string

Output only. The ID of the annotation spec that the model evaluation applies to. The ID is empty for overall model evaluation. NOTE: Currently there is no way to obtain the display_name of the annotation spec from its ID. To see the display_names, review the model evaluations in the UI.

createTime

Object

Output only. Timestamp when this model evaluation was created.

This object should have the same structure as Timestamp

evaluatedExampleCount

number

Output only. The number of examples used for model evaluation.

See also

google.cloud.automl.v1beta1.ModelEvaluation definition in proto format

OutputConfig

static

Output configuration.

Property

Parameter

gcsDestination

Object

The GCS location where the output must be written to.

This object should have the same structure as GcsDestination

See also

google.cloud.automl.v1beta1.OutputConfig definition in proto format

PredictRequest

static

Request message for PredictionService.Predict.

Properties

Parameter

name

string

Name of the model requested to serve the prediction.

payload

Object

Required. Payload to perform a prediction on. The payload must match the problem type that the model was trained to solve.

This object should have the same structure as ExamplePayload

params

Object with string properties

Additional domain-specific parameters, any string must be up to 25000 characters long.

  • For Image Classification:

    score_threshold - (float) A value from 0.0 to 1.0. When the model makes predictions for an image, it will only produce results that have at least this confidence score threshold. The default is 0.5.

See also

google.cloud.automl.v1beta1.PredictRequest definition in proto format

PredictResponse

static

Response message for PredictionService.Predict.

Currently, this is only used to return an image recognition prediction result. More prediction output metadata might be introduced in the future.

Properties

Parameter

payload

Array of Object

Prediction result.

This object should have the same structure as AnnotationPayload

metadata

Object with string properties

Additional domain-specific prediction response metadata.

See also

google.cloud.automl.v1beta1.PredictResponse definition in proto format

Row

static

Output only. A row in the confusion matrix.

Property

Parameter

exampleCount

Array of number

Output only. Value of the specific cell in the confusion matrix. The number of values each row is equal to the size of annotatin_spec_id.

See also

google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix.Row definition in proto format

TextClassificationDatasetMetadata

static

Dataset metadata for classification.

Property

Parameter

classificationType

number

Required. Type of the classification problem.

The number should be among the values of ClassificationType

See also

google.cloud.automl.v1beta1.TextClassificationDatasetMetadata definition in proto format

TextClassificationModelMetadata

static

Model metadata that is specific to text classification.

See also

google.cloud.automl.v1beta1.TextClassificationModelMetadata definition in proto format

TextSnippet

static

A representation of a text snippet.

Properties

Parameter

content

string

Required. The content of the text snippet as a string. Up to 250000 characters long.

mimeType

string

The format of the source text. For example, "text/html" or "text/plain". If left blank the format is automatically determined from the type of the uploaded content. The default is "text/html". Up to 25000 characters long.

contentUri

string

Output only. HTTP URI where you can download the content.

See also

google.cloud.automl.v1beta1.TextSnippet definition in proto format

TranslationAnnotation

static

Annotation details specific to translation.

Property

Parameter

translatedContent

Object

Output only . The translated content.

This object should have the same structure as TextSnippet

See also

google.cloud.automl.v1beta1.TranslationAnnotation definition in proto format

TranslationDatasetMetadata

static

Dataset metadata that is specific to translation.

Properties

Parameter

sourceLanguageCode

string

Required. The BCP-47 language code of the source language.

targetLanguageCode

string

Required. The BCP-47 language code of the target language.

See also

google.cloud.automl.v1beta1.TranslationDatasetMetadata definition in proto format

TranslationEvaluationMetrics

static

Evaluation metrics for the dataset.

Properties

Parameter

bleuScore

number

Output only. BLEU score.

baseBleuScore

number

Output only. BLEU score for base model.

See also

google.cloud.automl.v1beta1.TranslationEvaluationMetrics definition in proto format

TranslationModelMetadata

static

Model metadata that is specific to translation.

Properties

Parameter

baseModel

string

The resource name of the model to use as a baseline to train the custom model. If unset, we use the default base model provided by Google Translate. Format: projects/{project_id}/locations/{location_id}/models/{model_id}

sourceLanguageCode

string

Output only. Inferred from the dataset. The source languge (The BCP-47 language code) that is used for training.

targetLanguageCode

string

Output only. The target languge (The BCP-47 language code) that is used for training.

See also

google.cloud.automl.v1beta1.TranslationModelMetadata definition in proto format

UndeployModelRequest

static

Request message for AutoMl.UndeployModel.

Property

Parameter

name

string

Resource name of the model to undeploy.

See also

google.cloud.automl.v1beta1.UndeployModelRequest definition in proto format