0
votes

Update: seems only an issue with the pretrained.20210205.microsoft.dte.00.06.unicoder_multilingual.onnx that gets renamed to model.onnx. If I use the english model it works as expected.

Has anyone gotten the new Orchestrator that replaced nlp Dispatch to work on Azure Sites? I followed the migration examples and it all works locally using the emulator or ngork but on Azure Sites it can't seem to read the model.

Checking the logs I get the following error:

EXCEPTION THROWN - utility_onnx::OnnxUtility::InitOnnxSession(): e.what()=Load model from D:\home\site\wwwroot\CognativeModels\model\model.onnx failed:bad allocation, FILE=D:\a\1\s\oc\utility\OnnxUtility.h, LINE=117 EXCEPTION THROWN - OC - EmbedderBase::EmbedderBase(json const& config, const string onnxVocabFileDefault, const string onnxModelFileDefault): e.what()=Load model from D:\home\site\wwwroot\CognativeModels\model\model.onnx failed:bad allocation, FILE=D:\a\1\s\oc\EmbedderBase.cc, LINE=57 fail: Microsoft.Bot.Builder.Integration.AspNet.Core.BotFrameworkHttpAdapter[0] [OnTurnError] unhandled error : Failed to find or load Model with path D:\home\site\wwwroot\CognativeModels\model System.InvalidOperationException: Failed to find or load Model with path D:\home\site\wwwroot\CognativeModels\model ---> System.ApplicationException: Load model from D:\home\site\wwwroot\CognativeModels\model\model.onnx failed:bad allocation at Microsoft.BotFramework.Orchestrator.Orchestrator..ctor(String baseModelConfigOrPath) at Microsoft.Bot.Builder.AI.Orchestrator.OrchestratorRecognizer.b__39_0(String path) --- End of inner exception stack trace --- at Microsoft.Bot.Builder.AI.Orchestrator.OrchestratorRecognizer.b__39_0(String path) at System.Collections.Concurrent.ConcurrentDictionary2.GetOrAdd(TKey key, Func2 valueFactory) at Microsoft.Bot.Builder.AI.Orchestrator.OrchestratorRecognizer.InitializeModel() at Microsoft.Bot.Builder.AI.Orchestrator.OrchestratorRecognizer.RecognizeAsync(DialogContext dc, Activity activity, CancellationToken cancellationToken, Dictionary2 telemetryProperties, Dictionary2 telemetryMetrics) at SSC.Chatbot.QnABot1.OnMessageActivityAsync(ITurnContext1 turnContext, CancellationToken cancellationToken) in D:\a\1\s\Bots\QnABot.cs:line 121 at Microsoft.Bot.Builder.ActivityHandler.OnTurnAsync(ITurnContext turnContext, CancellationToken cancellationToken) at SSC.Chatbot.QnABot`1.OnTurnAsync(ITurnContext turnContext, CancellationToken cancellationToken) in D:\a\1\s\Bots\QnABot.cs:line 97 at Microsoft.Bot.Builder.TelemetryLoggerMiddleware.OnTurnAsync(ITurnContext context, NextDelegate nextTurn, CancellationToken cancellationToken) at Microsoft.Bot.Builder.Integration.ApplicationInsights.Core.TelemetryInitializerMiddleware.OnTurnAsync(ITurnContext context, NextDelegate nextTurn, CancellationToken cancellationToken) at Microsoft.Bot.Builder.BotFrameworkAdapter.TenantIdWorkaroundForTeamsMiddleware.OnTurnAsync(ITurnContext turnContext, NextDelegate next, CancellationToken cancellationToken) at Microsoft.Bot.Builder.MiddlewareSet.ReceiveActivityWithStatusAsync(ITurnContext turnContext, BotCallbackHandler callback, CancellationToken cancellationToken) at Microsoft.Bot.Builder.BotAdapter.RunPipelineAsync(ITurnContext turnContext, BotCallbackHandler callback, CancellationToken cancellationToken)

Looking through the Azure portal I can see the file exists at the path it is looking for it. Azure Portal Console

1
Are you using the nlp-with-orchestrator sample? On which channel are you getting this error? We have a similar reported issue hereranusharao
Looks like it is a VM size and type issue. The larger models only work on x64. github.com/microsoft/botframework-cli/issues/1287nephinj

1 Answers

0
votes

Was related to VM size and platform had to be x64 for the larger models. https://github.com/microsoft/botframework-cli/issues/1287