你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。
Train - Get Status
获取指定 LUIS 应用的 (意向和实体) 的所有模型的训练状态。 在调用此 API 以获取训练状态之前,必须调用训练 API 来训练 LUIS 应用。 “appID”指定 LUIS 应用 ID。 “versionId”指定 LUIS 应用的版本号。 例如,“0.1”。
GET {Endpoint}/luis/authoring/v3.0-preview/apps/{appId}/versions/{versionId}/train
URI 参数
名称 | 在 | 必需 | 类型 | 说明 |
---|---|---|---|---|
app
|
path | True |
string uuid |
应用程序 ID。 |
Endpoint
|
path | True |
string |
支持的认知服务终结点 (协议和主机名,例如: https://westus.api.cognitive.microsoft.com) 。 |
version
|
path | True |
string |
版本 ID。 |
请求头
名称 | 必需 | 类型 | 说明 |
---|---|---|---|
Ocp-Apim-Subscription-Key | True |
string |
响应
名称 | 类型 | 说明 |
---|---|---|
200 OK |
成功的响应提供你为训练提交的 LUIS 应用的训练状态详细信息数组。 响应数组中的每个元素都为 LUIS 应用中的模型 (意向或实体) 提供训练状态。 注意:未为预生成实体提供训练状态,因为它们已预先训练。 “modelId”属性标识训练状态对应于哪个意向或实体。 若要获取每个模型的名称和类型,请使用模型 API,该 API 具有采用以下格式的请求 URL: https://westus.api.cognitive.microsoft.com/luis/api/v3.0-preview/apps/{appId}/versions/{versionId}/models 每个模型的 details 属性可以包含以下字段:“statusId”:一个介于 0 到 3 之间的整数,对应于状态字段的值。 “status”:具有以下值之一的字符串:“Success”、“UpToDate”、“InProgress”、“Fail”。 如果状态为“Fail”,则“failureReason”属性提供失败的原因。 “exampleCount”:用于训练的示例数。 对于 None 意向或预生成的域意向和实体,此数字包括系统内部提供的示例以及添加到 LUIS 应用的示例。 “failureReason”:指示训练失败原因的字符串。 值“FewLabels”表示没有为训练提供标记的示例言语。 “trainingDateTime”:一个字符串,指示上次训练模型的时间。 该值使用 ISO 8601 格式表示 UTC (协调世界时) 的时间,UTC 指示符 (“Z”) ,例如:“2017-08-10T01:08:34Z”。 Media Types: "application/json", "JSON" |
|
Other Status Codes |
错误响应。 Media Types: "application/json", "JSON" |
安全性
Ocp-Apim-Subscription-Key
Type:
apiKey
In:
header
示例
Successful Get Application Version Training Status request
Sample Request
GET {Endpoint}/luis/authoring/v3.0-preview/apps/86226c53-b7a6-416f-876b-226b2b5ab07b/versions/0.1/train
Sample Response
[
{
"modelId": "f9b00d5b-1f2d-421e-bc99-5ff192d0b998",
"details": {
"statusId": 3,
"status": "InProgress",
"exampleCount": 0
}
},
{
"modelId": "51403af3-5342-4926-abaa-91172a42e075",
"details": {
"statusId": 2,
"status": "UpToDate",
"exampleCount": 12,
"trainingDateTime": "2017-01-31T21:42:02Z"
}
},
{
"modelId": "b4cf6402-dc79-4ca3-8666-b0007337e92b",
"details": {
"statusId": 1,
"status": "Fail",
"exampleCount": 12,
"failureReason": "FewLabels"
}
},
{
"modelId": "e8e3135a-acd9-4164-a65c-e2fedbe78cfa",
"details": {
"statusId": 3,
"status": "InProgress",
"exampleCount": 0
}
},
{
"modelId": "3291fac9-6368-4c87-9562-e78cae0fa7c6",
"details": {
"statusId": 0,
"status": "Success",
"exampleCount": 12,
"trainingDateTime": "2017-01-31T21:42:02Z"
}
},
{
"modelId": "a193efac-ab02-49d7-b005-ee717d45c4f1",
"details": {
"statusId": 3,
"status": "InProgress",
"exampleCount": 0
}
}
]
定义
名称 | 说明 |
---|---|
Error |
对 API 调用操作时出现错误响应。 |
Model |
模型训练详细信息。 |
Model |
模型训练信息。 |
Training |
训练状态。 |
ErrorResponse
对 API 调用操作时出现错误响应。
名称 | 类型 | 说明 |
---|---|---|
errorType |
string |
ModelTrainingDetails
模型训练详细信息。
名称 | 类型 | 说明 |
---|---|---|
exampleCount |
integer |
用于训练模型的示例计数。 |
failureReason |
string |
训练失败的原因。 |
status |
训练状态。 |
|
statusId |
integer |
训练请求状态 ID。 |
trainingDateTime |
string |
训练模型时。 |
ModelTrainingInfo
模型训练信息。
名称 | 类型 | 说明 |
---|---|---|
details |
模型训练详细信息。 |
|
modelId |
string |
模型的 ID (GUID) 。 |
TrainingStatus
训练状态。
名称 | 类型 | 说明 |
---|---|---|
Fail |
string |
|
InProgress |
string |
|
Queued |
string |
|
Success |
string |
|
UpToDate |
string |