I have a Microsoft LUIS Dispatch model. Whenever, I try to use dispatch refresh all the child models gets published into the Production Slot automatically. I want to first publish the dispatch into staging for test purpose and then only to Production. How to achieve this? Am I missing any key in the .dispatch file?
{
"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"
]
}
Thanks, pdeepa
I think it has something to do with using the --publishToStaging
option as stated in the Dispatch Command Line tool repo in this section.
Here's an example:
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
There's also a workaround, which is to use the direct version publishing feature as stated in this issue:
- 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.
- Make sure that the dispatch parent is linked to the same versionId as the one used in direct version publishing.
- 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.
- 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.