trained_model
Creates, updates, deletes, gets or lists a trained_model resource.
Overview
| Name | trained_model |
| Type | Resource |
| Id | azure.ai_text_analytics_authoring.trained_model |
Fields
The following fields are returned by SELECT queries:
- list_model_evaluation_results
- get_trained_model
| Name | Datatype | Description |
|---|---|---|
language | string | Represents the document 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. |
location | string | Represents the document path. Required. |
projectKind | string | Represents the project kind. Required. Known values are: "CustomSingleLabelClassification", "CustomMultiLabelClassification", "CustomEntityRecognition", "CustomAbstractiveSummarization", "CustomHealthcare", and "CustomTextSentiment". |
| 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 |
|---|---|---|---|---|
list_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. | |
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 | Long-running operation. |
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: ) |
project_name | string | |
stringIndexType | string | Specifies the method used to interpret string offsets. For additional information see https://aka.ms/text-analytics-offsets _. "Utf16CodeUnit" 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
- list_model_evaluation_results
- get_trained_model
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
language,
location,
projectKind
FROM azure.ai_text_analytics_authoring.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_text_analytics_authoring.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_text_analytics_authoring.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
- 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_text_analytics_authoring.trained_model.get_model_evaluation_summary
@trained_model_label='{{ trained_model_label }}' --required,
@project_name='{{ project_name }}' --required,
@endpoint='{{ endpoint }}' --required
;
Triggers evaluation operation on a trained model.
EXEC azure.ai_text_analytics_authoring.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 }}
}'
;
Long-running operation.
EXEC azure.ai_text_analytics_authoring.trained_model.load_snapshot
@trained_model_label='{{ trained_model_label }}' --required,
@project_name='{{ project_name }}' --required,
@endpoint='{{ endpoint }}' --required
;