BotBuilder-Samples icon indicating copy to clipboard operation
BotBuilder-Samples copied to clipboard

Orchestrator related samples failed with "Failed to find or load Model"

Open feich-ms opened this issue 4 years ago • 9 comments

Github issues for C# /JS / Java/ Python should be used for bugs and feature requests. Use Stack Overflow for general "how-to" questions.

Sample information

  1. Sample type: samples
  2. Sample language: dotnetcore
  3. Sample name: experimental/orchestrator/csharp_dotnetcore/01.dispatch-bot and experimental/orchestrator/csharp_dotnetcore/03.declarative-bot

Describe the bug

Follow the readme to run the sample and will get "Failed to find or load Model" error when playing it with Emulator.

To Reproduce

Steps to reproduce the behavior: Follow the steps in readme

Expected behavior

The bot respond correctly without throwing error

Screenshots

01.dispatch-bot image image

03.declarative-bot image

Additional context

Add any other context about the problem here.

feich-ms avatar Sep 21 '20 09:09 feich-ms

@tsuwandy could you take a look if there are some issues for these orchestrator samples?

feich-ms avatar Sep 21 '20 10:09 feich-ms

I also created a PR to update the sample docs to a working version based on my trial https://github.com/microsoft/BotBuilder-Samples/pull/2754. Hope that helps.

feich-ms avatar Sep 21 '20 11:09 feich-ms

@feich-ms, we have updated orchestrator-core and bf orchestrator packages (will be updated midnight). this error should go away once everything is updated and bf cli is pointed to new model 1.1.0-pretrained.20200819-12l.microsoft.dte.en.onnx.

Please verify, thanks!

tsuwandy avatar Sep 21 '20 22:09 tsuwandy

@tsuwandy, the error("Failed to find or load Model") is still there. Do you have a chance to follow the README of 03.declarative-bot to build the model and then chat with the bot in Emulator?

Below is what I generated with cli. All sources seem right, but the bot still run into this "Failed to find or load Model" issue when chatting with it. image image

feich-ms avatar Sep 22 '20 12:09 feich-ms

@feich-ms, I’ll take a look at the sample. I think we are still missing a build of bf orchestrator cli.

tsuwandy avatar Sep 22 '20 16:09 tsuwandy

The error comes from InitializeModel function here https://github.com/microsoft/botbuilder-dotnet/blob/main/libraries/Microsoft.Bot.Builder.AI.Orchestrator/OrchestratorAdaptiveRecognizer.cs#L294.

feich-ms avatar Sep 23 '20 02:09 feich-ms

@feich-ms, we just need latest Microsoft.BotFramework.Orchestrator nuget package (dependency of Microsoft.Bot.Builder.AI.Orchestrator package) from our preview feed (Conversational AI feed). I'll add a nuget. config to the samples so it could point to the CAI feed. Just waiting for latest package to be deployed.

tsuwandy avatar Sep 23 '20 06:09 tsuwandy

@feich-ms, we actually need Microsoft.BotFramework.Orchestrator nuget package pushed to nuget. Will have to talk to Chris Mullins to get approval tomorrow am or find some other solution. Thanks.

tsuwandy avatar Sep 24 '20 00:09 tsuwandy

Facing same issue "Failed to load model" using

`string modelPath = Path.GetFullPath(".\model"); string snapshotPath = Path.GetFullPath(".\generated\orchestrator.blu");

            // Create OrchestratorRecognizer.
            OrchestratorRecognizer orc = new OrchestratorRecognizer()
            {
                ModelPath = modelPath,
                SnapshotPath = snapshotPath
            };

            // Recognize user input.
            var recoResult = await orc.RecognizeAsync(turnContext, cancellationToken);`

KoradaRajesh avatar Nov 15 '20 16:11 KoradaRajesh

Old. Sample removed.

tracyboehrer avatar Mar 20 '24 15:03 tracyboehrer