LUIS Dispatch refresh 更改生产槽

LUIS Dispatch refresh Changes the production slot

我有一个 Microsoft LUIS Dispatch 模型。无论何时,我都会尝试使用 dispatch 刷新所有子模型自动发布到 Production Slot。我想首先将调度发布到暂存区以用于测试目的,然后仅发布到生产环境。如何做到这一点?我是否遗漏了 .dispatch 文件中的任何密钥?

{
  "authoringRegion": "westus",
  "hierarchical": true,
  "useAllTrainingData": false,
  "dontReviseUtterance": false,
  "copyLuisData": true,
  "normalizeDiacritics": true,
  "appId": "DispatchAppId",
  "authoringKey": "AuthKey",
  "version": "v3",
  "region": "westus",
  "type": "dispatch",
  "name": "DispatchModel"
  "services": [
    {
      "intentName": "l_Model1",
      "appId": "MyAppid-1",
      "authoringKey": "AuthKey",
      "version": "v3",
      "region": "westus",
      "type": "luis",
      "name": "Model1",
      "id": "1"
    },
    {
      "intentName": "l_Model2",
      "appId": "MyAppid-2",
      "authoringKey": "AuthKey",
      "version": "v3",
      "region": "westus",
      "type": "luis",
      "name": "Model2",
      "id": "1"
    }
  ],
  "serviceIds": [
    "1",
    "2"
  ]
}

谢谢, 迪帕

我认为这与使用 --publishToStaging 选项有关,如 this 部分的 Dispatch Command Line tool repo 中所述。

这是一个例子:

dispatch create [options]
dispatch create --publishToStaging true --useAllTrainingData true
dispatch create --bot c:\src\bot\testbot.bot --secret <your_bot_file_secret>
dispatch create --dontImport true --useAllTrainingData true

还有一个解决方法,就是使用this问题中所述的直接版本发布功能:

  1. Publish the updated child model using direct version publishing. This can be done only via calling REST API for now (not yet available in the LUIS UI) by setting the "directVersionPublish"flag in publish request body to true. API reference here.
  2. Make sure that the dispatch parent is linked to the same versionId as the one used in direct version publishing.
  3. After republishing the dispatch parent, you are expected to see the results of the child application version that was published with direct version publishing. An important note is that this will change all the published slots of the dispatch parent to point to the directly published version of the child.
  4. Optionally, if you want to test changes in the dispatch parent model itself without publishing it to the PRODUCTION slot, you can actually use direct version publish the dispatch parent, and query it with the endpoint V3 APIs.