REST Resource: projects.locations.models

Resource: Model

API proto representing a trained machine learning model.

JSON representation
{
  "name": string,
  "displayName": string,
  "datasetId": string,
  "createTime": string,
  "updateTime": string,
  "deploymentState": enum(DeploymentState),

  // Union field model_metadata can be only one of the following:
  "imageClassificationModelMetadata": {
    object(ImageClassificationModelMetadata)
  },
  "imageSegmentationModelMetadata": {
    object(ImageSegmentationModelMetadata)
  },
  "textSentimentModelMetadata": {
    object(TextSentimentModelMetadata)
  }
  // End of list of possible types for union field model_metadata.
}
Fields
name

string

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

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. It must start with a letter.

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

string (Timestamp format)

Output only. Timestamp when the model training finished and can be used for prediction.

A timestamp in RFC3339 UTC "Zulu" format, accurate to nanoseconds. Example: "2014-10-02T15:01:23.045123456Z".

updateTime

string (Timestamp format)

Output only. Timestamp when this model was last updated.

A timestamp in RFC3339 UTC "Zulu" format, accurate to nanoseconds. Example: "2014-10-02T15:01:23.045123456Z".

deploymentState

enum(DeploymentState)

Output only. Deployment state of the model. A model can only serve prediction requests after it gets deployed.

Union field model_metadata. Required. The model metadata that is specific to the problem type. Must match the metadata type of the dataset used to train the model. model_metadata can be only one of the following:
imageClassificationModelMetadata

object(ImageClassificationModelMetadata)

Metadata for image classification models.

imageSegmentationModelMetadata

object(ImageSegmentationModelMetadata)

Metadata for image segmentation models.

textSentimentModelMetadata

object(TextSentimentModelMetadata)

Metadata for text sentiment models.

ImageClassificationModelMetadata

Model metadata for image classification.

JSON representation
{
  "baseModelId": string,
  "trainBudget": string,
  "trainCost": string,
  "stopReason": string,
  "modelType": string
}
Fields
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 must be in the same project and location as the new model to create, and have the same modelType.

trainBudget

string (int64 format)

Required. The train budget of creating this model, expressed in hours. The actual trainCost will be equal or less than this value.

trainCost

string (int64 format)

Output only. The actual train cost of creating this model, expressed in hours. 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, MODEL_CONVERGED.

modelType

string

Optional. Type of the model. The available values are: * cloud - Model to be used via prediction calls to AutoML API. This is the default value. * mobile-low-latency-1 - A model that, in addition to providing prediction via AutoML API, can also be exported (see AutoMl.ExportModel) and used on a mobile or edge device with TensorFlow afterwards. Expected to have low latency, but may have lower prediction quality than other models. * mobile-versatile-1 - A model that, in addition to providing prediction via AutoML API, can also be exported (see AutoMl.ExportModel) and used on a mobile or edge device with TensorFlow afterwards. * mobile-high-accuracy-1 - A model that, in addition to providing prediction via AutoML API, can also be exported (see AutoMl.ExportModel) and used on a mobile or edge device with TensorFlow afterwards. Expected to have a higher latency, but should also have a higher prediction quality than other models. * mobile-core-ml-low-latency-1 - A model that, in addition to providing prediction via AutoML API, can also be exported (see AutoMl.ExportModel) and used on a mobile device with Core ML afterwards. Expected to have low latency, but may have lower prediction quality than other models. * mobile-core-ml-versatile-1 - A model that, in addition to providing prediction via AutoML API, can also be exported (see AutoMl.ExportModel) and used on a mobile device with Core ML afterwards. * mobile-core-ml-high-accuracy-1 - A model that, in addition to providing prediction via AutoML API, can also be exported (see AutoMl.ExportModel) and used on a mobile device with Core ML afterwards. Expected to have a higher latency, but should also have a higher prediction quality than other models.

ImageSegmentationModelMetadata

Model metadata specific to Image Segmentation.

JSON representation
{
  "annotationSpec": [
    {
      object(AnnotationSpec)
    }
  ]
}
Fields
annotationSpec[]

object(AnnotationSpec)

Output only. The snapshot of datasets's annotation specs. Only 3 fields are populated: name - Output only. displayName - Output only. class - Output only.

TextSentimentModelMetadata

Model metadata that is specific to text sentiment.

DeploymentState

Deployment state of the model.

Enums
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.

Methods

create

Creates a model.

delete

Deletes a model.

deploy

Deploys a model.

export

Exports a trained, "export-able", model to a user specified Google Cloud Storage location.

get

Gets a model.

getIamPolicy

Gets the access control policy for a resource.

list

Lists models.

predict

Perform an online prediction.

setIamPolicy

Sets the access control policy on the specified resource.

undeploy

Removes a deployed model.
Esta página foi útil? Conte sua opinião sobre:

Enviar comentários sobre…

Cloud AutoML Vision
Precisa de ajuda? Acesse nossa página de suporte.