- Resource: Model
 - ImageClassificationModelMetadata
 - TextClassificationModelMetadata
 - TranslationModelMetadata
 - DeploymentState
 - Methods
 
Resource: Model
API proto representing a trained machine learning model.
| JSON representation | |
|---|---|
{ "name": string, "displayName": string, "datasetId": string, "createTime": string, "updateTime": string, "deploymentState": enum(  | 
              |
| Fields | ||
|---|---|---|
name | 
                
                   
 
                    Output only. Resource name of the model. Format:   | 
              |
displayName | 
                
                   
 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. The first character must be a letter.  | 
              |
datasetId | 
                
                   
 Required. The resource ID of the dataset used to create the model. The dataset must come from the same ancestor project and location.  | 
              |
createTime | 
                
                   
 
 Output only. Timestamp when this model was created. A timestamp in RFC3339 UTC "Zulu" format, accurate to nanoseconds. Example:   | 
              |
updateTime | 
                
                   
 
 Output only. Timestamp when this model was last updated. A timestamp in RFC3339 UTC "Zulu" format, accurate to nanoseconds. Example:   | 
              |
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 | 
                
                   
 Metadata for image classification models.  | 
              |
textClassificationModelMetadata | 
                
                   
 Metadata for text classification models.  | 
              |
translationModelMetadata | 
                
                   
 Metadata for translation models.  | 
              |
ImageClassificationModelMetadata
Model metadata for image classification.
| JSON representation | |
|---|---|
{ "baseModelId": string, "trainBudget": string, "trainCost": string, "stopReason": string }  | 
              |
| Fields | |
|---|---|
baseModelId | 
                
                   
 
                    Optional. The ID of the   | 
              
trainBudget | 
                
                   
 
                    Required. The train budget of creating this model. The actual   | 
              
trainCost | 
                
                   
 
                    Output only. The actual train cost of creating this model. If this model is created from a   | 
              
stopReason | 
                
                   
 Output only. The reason that this create model operation stopped, e.g. BUDGET_REACHED, MODEL_CONVERGED.  | 
              
TextClassificationModelMetadata
Model metadata that is specific to text classification.
TranslationModelMetadata
Model metadata that is specific to translation.
| JSON representation | |
|---|---|
{ "baseModel": string, "sourceLanguageCode": string, "targetLanguageCode": string }  | 
              |
| Fields | |
|---|---|
baseModel | 
                
                   
 
                    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:   | 
              
sourceLanguageCode | 
                
                   
 Output only. Inferred from the dataset. The source language (The BCP-47 language code) that is used for training.  | 
              
targetLanguageCode | 
                
                   
 Output only. The target language (The BCP-47 language code) that is used for training.  | 
              
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 | 
            |
|---|---|
                
 | 
              Creates a model. | 
                
 | 
              Deletes a model. | 
                
 | 
              Gets a model. | 
                
 | 
              Gets the access control policy for a resource. | 
                
 | 
              Lists models. | 
                
 | 
              Perform a prediction. | 
                
 | 
              Sets the access control policy on the specified resource. |