microsoft / botframework-solutions

Welcome to the Bot Framework Solutions repository which is the home for a set of templates and solutions to help build advanced conversational experiences using Azure Bot Service and Bot Framework. Microsoft Bot Framework is a comprehensive framework for building enterprise-grade conversational AI experiences.
https://aka.ms/bfsolutionsdocs
MIT License
1.05k stars 529 forks source link

Dispatch refresh fails after running botskills connect on a brand new VA #1884

Closed ryanisgrig closed 5 years ago

ryanisgrig commented 5 years ago

What project is affected?

What language is this in?

C#

What happens?

After creating a new VA and adding the skills, the dispatch model is not updated with corresponding skill LUIS models.

What are the steps to reproduce this issue?

What were you expecting to happen?

The dispatch LUIS app should be published with all of the connected skills.

Can you share any logs, error output, etc.?

After running the command botskills connect --botName {BOTNAME} --remoteManifest "{REMOTE_MANIFEST_URL}" --luisFolder ..\..\..\..\..\skills\src\csharp\pointofinterestskill\pointofinterestskill\Deployment\Resources\LU\en\ --cs from the VirtualAssistantSample project, the .dispatch file looks like:

    {
      "intentName": "pointOfInterestSkill",
      "path": "..\\..\\..\\..\\..\\skills\\src\\csharp\\pointofinterestskill\\pointofinterestskill\\Deployment\\Resources\\LU\\en\\PointOfInterest.luis",
      "type": "file",
      "name": "pointOfInterestSkill",
      "id": "4"
    }

In a .dispatch file that works, when LUIS files were in the VA Template this looked like the below. I may have run this using the old add_remote_skill.ps1 script (I don't remember)

    {
      "includedIntents": [
        "NAVIGATION_ROUTE_FROM_X_TO_Y",
        "NAVIGATION_CANCEL_ROUTE",
        "NAVIGATION_FIND_POINTOFINTEREST",
        "NAVIGATION_FIND_PARKING"
      ],
      "intentName": "pointOfInterestSkill",
      "path": "C:\\Users\\rylengel\\source\\repos\\AI\\templates\\Virtual-Assistant-Template\\csharp\\Sample\\VirtualAssistantSample\\Deployment\\Resources\\Skills\\en\\pointofinterest.luis",
      "type": "file",
      "name": "pointOfInterestSkill",
      "id": "4"
    }

Is it missing the included intents?

Error

PS C:\Users\rylengel\source\repos\botframework-solutions\templates\Virtual-Assistant-Template\csharp\Sample\VirtualAssistantSample> dispatch refrepatch\en\AndroidDevVAen_Dispatch.dispatch --dataFolder .\Deployment\Resources\Dispatch\en\data\                                                   Exporting services for dispatch...                                                                                                                Exporting AndroidDevVAen_General LUIS application...
Exported QnA app JSON is at C:\Users\rylengel\source\repos\botframework-solutions\templates\Virtual-Assistant-Template\csharp\Sample\VirtualAssistantSample\Deployment\Resources\Dispatch\en\data\data\_Q_q_Faq.json                                                                                Expanding kb 97866a28-4042-470c-a66d-d794cb8ee16d with word alterations                                                                           Creating dispatch LUIS model json...                                                                                                              Creating training data...                                                                                                                         WARNING: Number of samples in 'C:\Users\rylengel\source\repos\botframework-solutions\templates\Virtual-Assistant-Template\csharp\Sample\VirtualAssistantSample\Deployment\Resources\Dispatch\en\data\data\_experiments\model_001\train.txt' that were used by multiple categories: 16               WARNING: Number of samples in 'C:\Users\rylengel\source\repos\botframework-solutions\templates\Virtual-Assistant-Template\csharp\Sample\VirtualAssistantSample\Deployment\Resources\Dispatch\en\data\data\_experiments\model_001\cv5\fold000\train.txt' that were used by multiple categories: 10   WARNING: Number of samples in 'C:\Users\rylengel\source\repos\botframework-solutions\templates\Virtual-Assistant-Template\csharp\Sample\VirtualAssistantSample\Deployment\Resources\Dispatch\en\data\data\_experiments\model_001\cv5\fold001\train.txt' that were used by multiple categories: 12   WARNING: Number of samples in 'C:\Users\rylengel\source\repos\botframework-solutions\templates\Virtual-Assistant-Template\csharp\Sample\VirtualAssistantSample\Deployment\Resources\Dispatch\en\data\data\_experiments\model_001\cv5\fold002\train.txt' that were used by multiple categories: 8    WARNING: Number of samples in 'C:\Users\rylengel\source\repos\botframework-solutions\templates\Virtual-Assistant-Template\csharp\Sample\VirtualAssistantSample\Deployment\Resources\Dispatch\en\data\data\_experiments\model_001\cv5\fold003\train.txt' that were used by multiple categories: 8    WARNING: Number of samples in 'C:\Users\rylengel\source\repos\botframework-solutions\templates\Virtual-Assistant-Template\csharp\Sample\VirtualAssistantSample\Deployment\Resources\Dispatch\en\data\data\_experiments\model_001\cv5\fold004\train.txt' that were used by multiple categories: 10   Updating AndroidDevVAen_Dispatch model...                                                                                                         Training AndroidDevVAen_General...                                                                                                                Importing AndroidDevVAen_Dispatch model...                                                                                                                                                                                                                                                          ERROR                                                                                                                                             Failed importing latest version of AndroidDevVAen_Dispatch app        

Any screenshots or additional context?

Batta32 commented 5 years ago

Hi @ryanlengel,

By design, the tool, unlike the add_remote_skill.ps1, includes all the intents because it doesn't use the argument --includedIntents when executing the dispatch tool.

image

The purpose of the Virtual Assistant Dispatch is to have a model with the connected skills, so the dispatch knows where to send the intent, and then the related skill matches with the correct intent to execute the intent's functionality. Please check this related issue #1719.

However, we have planned to implement the logic to consume the inlineTriggerUtterances in the near future, which would make the dispatch include only the intents located in the skill manifest.

ryanisgrig commented 5 years ago

I think I may be misunderstanding, but in my case it appeared that no intents were added using botskills connect. I expected all of the them to be added from the manifest file.

Sent from my📱


From: Martin Battaglino notifications@github.com Sent: Friday, July 19, 2019 4:56:59 PM To: microsoft/botframework-solutions botframework-solutions@noreply.github.com Cc: Ryan Lengel Isgrig Ryan.Lengel@microsoft.com; Mention mention@noreply.github.com Subject: Re: [microsoft/botframework-solutions] Dispatch refresh fails after running botskills connect on a brand new VA (#1884)

Hi @ryanlengelhttps://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fryanlengel&data=02%7C01%7CRyan.Lengel%40microsoft.com%7C1bcb2894c79d41b46e7508d70c8ba506%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636991666217953861&sdata=2iMPLBWL6uH2xj9WrKYGzjQIr1rPFuFSjWMERxSmxqs%3D&reserved=0,

By design, the tool, unlike the add_remote_skill.ps1, includes all the intents because it doesn't use the argument --includedIntents when executing the dispatch toolhttps://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fmicrosoft%2Fbotbuilder-tools%2Ftree%2Fmaster%2Fpackages%2FDispatch%23adding-source-to-dispatch&data=02%7C01%7CRyan.Lengel%40microsoft.com%7C1bcb2894c79d41b46e7508d70c8ba506%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636991666217963862&sdata=xnvTSNCwx86gthO9Rfy1%2Fs0Oa4Y%2FtqgvcjqCNrGCo3A%3D&reserved=0.

[image]https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fuser-images.githubusercontent.com%2F11904023%2F61565116-76dee180-aa4e-11e9-938f-b6637d09b927.png&data=02%7C01%7CRyan.Lengel%40microsoft.com%7C1bcb2894c79d41b46e7508d70c8ba506%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636991666217963862&sdata=qg6py2MpK%2FGbcgsSazYKmI%2FGkbo8YJr0k1UcCdTxlsQ%3D&reserved=0

The purpose of the Virtual Assistant Dispatch is to have a model with the connected skills, so the dispatch knows where to send the intent, and then the related skill matches with the correct intent to execute the intent's functionality. Please check this related issue #1719https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fmicrosoft%2Fbotframework-solutions%2Fissues%2F1719&data=02%7C01%7CRyan.Lengel%40microsoft.com%7C1bcb2894c79d41b46e7508d70c8ba506%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636991666217973852&sdata=Psc6asgtm0M6by7cnBY3qaVewY82QSXnK1rd5LaTO%2BQ%3D&reserved=0.

However, we have planned to implement the logic to consume the inlineTriggerUtterances in the near future, which would make the dispatch include only the intents located in the skill manifest.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fmicrosoft%2Fbotframework-solutions%2Fissues%2F1884%3Femail_source%3Dnotifications%26email_token%3DAKIMTSBNB5RQLH24N37PEUDQAITBXA5CNFSM4IETE7CKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD2MXX5I%23issuecomment-513375221&data=02%7C01%7CRyan.Lengel%40microsoft.com%7C1bcb2894c79d41b46e7508d70c8ba506%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636991666217973852&sdata=YZddajbg3hvWpuVY56BGfwkEmOTiPfxLOHw5vZJV2kw%3D&reserved=0, or mute the threadhttps://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAKIMTSAYDZQKJ5ADYO3GCQDQAITBXANCNFSM4IETE7CA&data=02%7C01%7CRyan.Lengel%40microsoft.com%7C1bcb2894c79d41b46e7508d70c8ba506%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636991666217983850&sdata=vO9Y6GPVkUtZ8h1gI8F7ikiSN39cOVy0eWdtEa7t4%2Bs%3D&reserved=0.

dfavretto commented 5 years ago

Hi @ryanlengel , in the case the --includedIntents argument isn't present, the Dispatch CLI takes by default all the intents, and doesn't write them down. It only writes the intents when not all the intents are included.

Also, I see you have an error that says:

ERROR Failed importing latest version of AndroidDevVAen_Dispatch app

We once had that issue, but I don't remember right now what caused it, so we'll try to see what's causing this error next week.

ryanisgrig commented 5 years ago

Closing as the root cause of this is #1949 and I have botskills refresh working on the environment that triggered this issue