Aracılığıyla paylaş


Train - Get Status

Gets the training status of all models (intents and entities) for the specified LUIS app. You must call the train API to train the LUIS app before you call this API to get training status. "appID" specifies the LUIS app ID. "versionId" specifies the version number of the LUIS app. For example, "0.1".

GET {Endpoint}/luis/api/v2.0/apps/{appId}/versions/{versionId}/train

URI Parameters

Name In Required Type Description
appId
path True

string

uuid

The application ID.

Endpoint
path True

string

Supported Cognitive Services endpoints (protocol and hostname, for example: https://westus.api.cognitive.microsoft.com).

versionId
path True

string

The version ID.

Request Header

Name Required Type Description
Ocp-Apim-Subscription-Key True

string

Responses

Name Type Description
200 OK

ModelTrainingInfo[]

A successful response provides an array of training status details for a LUIS app that you submitted for training. Each element in the response array provides training status for a model (intent or entity) in the LUIS app. Note: Training status is not provided for prebuilt entities because they are pretrained. The "modelId" property identifies which intent or entity the training status corresponds to. To get the name and type of each model, use the models API which has a request URL in this format: https://westus.api.cognitive.microsoft.com/luis/api/v2.0/apps/{appId}/versions/{versionId}/models The details property for each model can contain the following fields: "statusId": An integer from 0 to 3 that corresponds to the value of the status field. "status": A string with one of the following values: "Success", "UpToDate", "InProgress", "Fail". If the status is "Fail", the "failureReason" property provides the reason for failure. "exampleCount": The number of examples used for training. In the case of the None intent or prebuilt domain intents and entities, this number includes example provided internally by the system as well as examples you added to your LUIS app. "failureReason": A string that indicates the reason training failed. The value "FewLabels" means that no labeled example utterances were provided for training. "trainingDateTime": A string indicating the time the model was last trained. The value uses the ISO 8601 format for representing times in UTC (Coordinated Universal Time) with a UTC designator ("Z"), for example: "2017-08-10T01:08:34Z".

Media Types: "application/json", "JSON"

Other Status Codes

ErrorResponse

Error Response.

Media Types: "application/json", "JSON"

Security

Ocp-Apim-Subscription-Key

Type: apiKey
In: header

Examples

Successful Get Application Version Training Status request

Sample request

GET {Endpoint}/luis/api/v2.0/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
    }
  }
]

Definitions

Name Description
ErrorResponse

Error response when invoking an operation on the API.

ModelTrainingDetails

Model Training Details.

ModelTrainingInfo

Model Training Info.

TrainingStatus

The Training status.

ErrorResponse

Error response when invoking an operation on the API.

Name Type Description
errorType

string

ModelTrainingDetails

Model Training Details.

Name Type Description
exampleCount

integer

The count of examples used to train the model.

failureReason

string

Reason for the training failure.

status

TrainingStatus

The Training status.

statusId

integer

The train request status ID.

trainingDateTime

string

When the model was trained.

ModelTrainingInfo

Model Training Info.

Name Type Description
details

ModelTrainingDetails

Model Training Details.

modelId

string

The ID (GUID) of the model.

TrainingStatus

The Training status.

Name Type Description
Fail

string

InProgress

string

Queued

string

Success

string

UpToDate

string