trained_model
Creates, updates, deletes, gets or lists a trained_model resource.
Overview
| Name | trained_model |
| Type | Resource |
| Id | azure.ai_language.trained_model |
Fields
The following fields are returned by SELECT queries:
- get_evaluation_status
- get_model_evaluation_results
- get_trained_model
| Name | Datatype | Description |
|---|---|---|
createdDateTime | string (date-time) | The creation date time of the job. Required. |
errors | array | The errors encountered while executing the job. |
expirationDateTime | string (date-time) | The expiration date time of the job. |
jobId | string | The job ID. Required. |
lastUpdatedDateTime | string (date-time) | The last date time the job was updated. Required. |
result | object | Represents evaluation task detailed result. Required. |
status | string | The job status. Required. Known values are: "notStarted", "running", "succeeded", "failed", "cancelled", "cancelling", and "partiallyCompleted". (notStarted, running, succeeded, failed, cancelled, cancelling, partiallyCompleted) |
warnings | array | The warnings that were encountered while executing the job. |
| Name | Datatype | Description |
|---|---|---|
entitiesResult | object | Represents the entities results for the utterance. Required. |
intentsResult | object | Represents the intents results for the utterance. Required. |
language | string | Represents the utterance language. This is BCP-47 representation of a language. For example, use "en" for English, "en-gb" for English (UK), "es" for Spanish etc. Required. |
text | string | Represents the utterance text. Required. |
| Name | Datatype | Description |
|---|---|---|
hasSnapshot | boolean | The flag to indicate if the trained model has a snapshot ready. Required. |
label | string | The trained model label. Required. |
lastTrainedDateTime | string (date-time) | The last trained date time of the model. Required. |
lastTrainingDurationInSeconds | integer | The duration of the model's last training request in seconds. Required. |
modelExpirationDate | string (date) | The model expiration date. Required. |
modelId | string | The model ID. Required. |
modelTrainingConfigVersion | string | The model training config version. Required. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_evaluation_status | select | trained_model_label, job_id, project_name, endpoint | Gets the status for an evaluation job. | |
get_model_evaluation_results | select | trained_model_label, project_name, stringIndexType, endpoint | top, skip, maxpagesize | Gets the detailed results of the evaluation for a trained model. This includes the raw inference results for the data included in the evaluation process. |
get_trained_model | select | trained_model_label, project_name, endpoint | Gets the details of a trained model. | |
delete_trained_model | delete | trained_model_label, project_name, endpoint | Deletes an existing trained model. | |
get_model_evaluation_summary | exec | trained_model_label, project_name, endpoint | Gets the evaluation summary of a trained model. The summary includes high level performance measurements of the model e.g., F1, Precision, Recall, etc. | |
get_load_snapshot_status | exec | trained_model_label, job_id, project_name, endpoint | Gets the status for loading a snapshot. | |
evaluate_model | exec | trained_model_label, project_name, endpoint | Triggers evaluation operation on a trained model. | |
load_snapshot | exec | trained_model_label, project_name, endpoint | Restores the snapshot of this trained model to be the current working directory of the project. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
endpoint | string | The service endpoint host (no scheme), e.g. myaccount.table.cosmos.azure.com:443 - value of the client Endpoint parameter. (default: ) |
job_id | string | The job ID. Required. |
project_name | string | |
stringIndexType | string | Specifies the method used to interpret string offsets. For additional information see https://aka.ms/text-analytics-offsets _. Known values are: "Utf16CodeUnit", "Utf8CodeUnit", and "Utf32CodeUnit". Required. |
trained_model_label | string | The trained model label. Required. |
maxpagesize | integer | |
skip | integer | The number of result items to skip. Default value is None. |
top | integer | The number of result items to return. Default value is None. |
SELECT examples
- get_evaluation_status
- get_model_evaluation_results
- get_trained_model
Gets the status for an evaluation job.
SELECT
createdDateTime,
errors,
expirationDateTime,
jobId,
lastUpdatedDateTime,
result,
status,
warnings
FROM azure.ai_language.trained_model
WHERE trained_model_label = '{{ trained_model_label }}' -- required
AND job_id = '{{ job_id }}' -- required
AND project_name = '{{ project_name }}' -- required
AND endpoint = '{{ endpoint }}' -- required
;
Gets the detailed results of the evaluation for a trained model. This includes the raw inference results for the data included in the evaluation process.
SELECT
entitiesResult,
intentsResult,
language,
text
FROM azure.ai_language.trained_model
WHERE trained_model_label = '{{ trained_model_label }}' -- required
AND project_name = '{{ project_name }}' -- required
AND stringIndexType = '{{ stringIndexType }}' -- required
AND endpoint = '{{ endpoint }}' -- required
AND top = '{{ top }}'
AND skip = '{{ skip }}'
AND maxpagesize = '{{ maxpagesize }}'
;
Gets the details of a trained model.
SELECT
hasSnapshot,
label,
lastTrainedDateTime,
lastTrainingDurationInSeconds,
modelExpirationDate,
modelId,
modelTrainingConfigVersion
FROM azure.ai_language.trained_model
WHERE trained_model_label = '{{ trained_model_label }}' -- required
AND project_name = '{{ project_name }}' -- required
AND endpoint = '{{ endpoint }}' -- required
;
DELETE examples
- delete_trained_model
Deletes an existing trained model.
DELETE FROM azure.ai_language.trained_model
WHERE trained_model_label = '{{ trained_model_label }}' --required
AND project_name = '{{ project_name }}' --required
AND endpoint = '{{ endpoint }}' --required
;
Lifecycle Methods
- get_model_evaluation_summary
- get_load_snapshot_status
- evaluate_model
- load_snapshot
Gets the evaluation summary of a trained model. The summary includes high level performance measurements of the model e.g., F1, Precision, Recall, etc.
EXEC azure.ai_language.trained_model.get_model_evaluation_summary
@trained_model_label='{{ trained_model_label }}' --required,
@project_name='{{ project_name }}' --required,
@endpoint='{{ endpoint }}' --required
;
Gets the status for loading a snapshot.
EXEC azure.ai_language.trained_model.get_load_snapshot_status
@trained_model_label='{{ trained_model_label }}' --required,
@job_id='{{ job_id }}' --required,
@project_name='{{ project_name }}' --required,
@endpoint='{{ endpoint }}' --required
;
Triggers evaluation operation on a trained model.
EXEC azure.ai_language.trained_model.evaluate_model
@trained_model_label='{{ trained_model_label }}' --required,
@project_name='{{ project_name }}' --required,
@endpoint='{{ endpoint }}' --required
@@json=
'{
"kind": "{{ kind }}",
"trainingSplitPercentage": {{ trainingSplitPercentage }},
"testingSplitPercentage": {{ testingSplitPercentage }}
}'
;
Restores the snapshot of this trained model to be the current working directory of the project.
EXEC azure.ai_language.trained_model.load_snapshot
@trained_model_label='{{ trained_model_label }}' --required,
@project_name='{{ project_name }}' --required,
@endpoint='{{ endpoint }}' --required
;