models
Creates, updates, deletes, gets or lists a models
resource.
Overview
Name | models |
Type | Resource |
Id | google.translate.models |
Fields
Name | Datatype | Description |
---|---|---|
name | string | The resource name of the model, in form of projects/{project-number-or-id}/locations/{location_id}/models/{model_id} |
createTime | string | Output only. Timestamp when the model resource was created, which is also when the training started. |
dataset | string | The dataset from which the model is trained, in form of projects/{project-number-or-id}/locations/{location_id}/datasets/{dataset_id} |
displayName | string | 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. |
sourceLanguageCode | string | Output only. The BCP-47 language code of the source language. |
targetLanguageCode | string | Output only. The BCP-47 language code of the target language. |
testExampleCount | integer | Output only. Number of examples (sentence pairs) used to test the model. |
trainExampleCount | integer | Output only. Number of examples (sentence pairs) used to train the model. |
updateTime | string | Output only. Timestamp when this model was last updated. |
validateExampleCount | integer | Output only. Number of examples (sentence pairs) used to validate the model. |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
projects_locations_models_get | SELECT | locationsId, modelsId, projectsId | Gets a model. |
projects_locations_models_list | SELECT | locationsId, projectsId | Lists models. |
projects_locations_models_create | INSERT | locationsId, projectsId | Creates a Model. |
projects_locations_models_delete | DELETE | locationsId, modelsId, projectsId | Deletes a model. |
SELECT
examples
Lists models.
SELECT
name,
createTime,
dataset,
displayName,
sourceLanguageCode,
targetLanguageCode,
testExampleCount,
trainExampleCount,
updateTime,
validateExampleCount
FROM google.translate.models
WHERE locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}';
INSERT
example
Use the following StackQL query and manifest file to create a new models
resource.
- All Properties
- Manifest
/*+ create */
INSERT INTO google.translate.models (
locationsId,
projectsId,
name,
displayName,
dataset
)
SELECT
'{{ locationsId }}',
'{{ projectsId }}',
'{{ name }}',
'{{ displayName }}',
'{{ dataset }}'
;
- name: your_resource_model_name
props:
- name: name
value: string
- name: displayName
value: string
- name: dataset
value: string
- name: sourceLanguageCode
value: string
- name: targetLanguageCode
value: string
- name: trainExampleCount
value: integer
- name: validateExampleCount
value: integer
- name: testExampleCount
value: integer
- name: createTime
value: string
- name: updateTime
value: string
DELETE
example
Deletes the specified models
resource.
/*+ delete */
DELETE FROM google.translate.models
WHERE locationsId = '{{ locationsId }}'
AND modelsId = '{{ modelsId }}'
AND projectsId = '{{ projectsId }}';