Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bf orchestrator:create failing with parsing error #1306

Open
rdivakar opened this issue Oct 18, 2021 · 3 comments
Open

bf orchestrator:create failing with parsing error #1306

rdivakar opened this issue Oct 18, 2021 · 3 comments
Assignees
Labels
bug Indicates an unexpected problem or an unintended behavior. needs-triage The issue has just been created and it has not been reviewed by the team.

Comments

@rdivakar
Copy link

Versions

@microsoft/botframework-cli/4.15.0-rc0 win32-x64 node-v14.18.1
Node v14.18.1
Powershell
WIndows 11

Describe the bug

Below command is failing with json parsing error.

bf orchestrator:create --debug --hierarchical --in ./CognitiveModels --out ./generated --model ./model
Error:

[2021-10-18T18:46:43.816Z] LOG-MESSAGE: "refresh=undefined"
[2021-10-18T18:46:43.818Z] LOG-MESSAGE: "baseModelPath=D:\src\Akira\src\Akira\AkiraBot\model"
[2021-10-18T18:46:43.818Z] LOG-MESSAGE: "entityBaseModelPath=D:\src\Akira\src\Akira\AkiraBot\model"
[2021-10-18T18:46:43.818Z] LOG-MESSAGE: "inputPathConfiguration=D:\src\Akira\src\Akira\AkiraBot"
[2021-10-18T18:46:43.818Z] LOG-MESSAGE: "outputPath=D:\src\Akira\src\Akira\AkiraBot\generated"
[2021-10-18T18:46:43.819Z] LOG-MESSAGE: "hierarchical=true"
[2021-10-18T18:46:43.819Z] LOG-MESSAGE: "fullEmbeddings=false"
[2021-10-18T18:46:43.819Z] LOG-MESSAGE: "OrchestratorCreate.runAsync(), ready to call LabelResolver.createWithSnapshotFileAsync()"
[2021-10-18T18:46:43.819Z] LOG-MESSAGE: "LabelResolver.createWithSnapshotAsync(): loading a snapshot."
[2021-10-18T18:46:43.819Z] LOG-MESSAGE: "OrchestratorHelper.getSnapshotFromFile()", argument0="D:\src\Akira\src\Akira\AkiraBot\generated"
[2021-10-18T18:46:43.820Z] LOG-MESSAGE: "LabelResolver.createWithSnapshotAsync(): baseModelPath=D:\src\Akira\src\Akira\AkiraBot\model, entityBaseModelPath=D:\src\Akira\src\Akira\AkiraBot\model"
[2021-10-18T18:46:43.820Z] LOG-MESSAGE: "LabelResolver.loadNlrAsync(): creating Orchestrator."
[2021-10-18T18:46:43.820Z] LOG-MESSAGE: "LabelResolver.loadNlrAsync(): baseModelPath=D:\src\Akira\src\Akira\AkiraBot\model"
[2021-10-18T18:46:43.820Z] LOG-MESSAGE: "LabelResolver.loadNlrAsync(): entityBaseModelPath=D:\src\Akira\src\Akira\AkiraBot\model"
[2021-10-18T18:46:43.820Z] LOG-MESSAGE: "LabelResolver.loadNlrAsync(): baseModelPath-resolved=D:\src\Akira\src\Akira\AkiraBot\model"
[2021-10-18T18:46:43.820Z] LOG-MESSAGE: "LabelResolver.loadNlrAsync(): entityBaseModelPath-resolved=D:\src\Akira\src\Akira\AkiraBot\model"
[2021-10-18T18:46:43.821Z] LOG-MESSAGE: "LabelResolver.loadNlrAsync(): loading intent and entity base model"
[2021-10-18T18:46:44.469Z] LOG-MESSAGE: "LabelResolver.loadNlrAsync(): leaving."
[2021-10-18T18:46:44.470Z] LOG-MESSAGE: "LabelResolver.createWithSnapshotAsync(): typeof(snapshot)=object"
[2021-10-18T18:46:44.470Z] LOG-MESSAGE: "LabelResolver.createWithSnapshotAsync(): snapshot.byteLength=0"
[2021-10-18T18:46:44.470Z] LOG-MESSAGE: "LabelResolver.createWithSnapshotAsync(): creating label resolver."
[2021-10-18T18:46:44.472Z] LOG-MESSAGE: "LabelResolver.createWithSnapshotAsync(): finished creating label resolver."
[2021-10-18T18:46:44.472Z] LOG-MESSAGE: "OrchestratorCreate.runAsync(), after calling LabelResolver.createWithSnapshotFileAsync()"
[2021-10-18T18:46:44.472Z] LOG-MESSAGE: "ready to call LabelResolver.setRuntimeParams(), fullEmbeddings=false"
[2021-10-18T18:46:44.472Z] LOG-MESSAGE: "ready to call LabelResolver.setRuntimeParams(), resetAll=false"
[2021-10-18T18:46:44.472Z] LOG-MESSAGE: "ready to call LabelResolver.setRuntimeParams(), useCompactEmbeddingsObject=[object Object]"
[2021-10-18T18:46:44.473Z] LOG-MESSAGE: "ready to call LabelResolver.setRuntimeParams(), useCompactEmbeddingsObject.use_compact_embeddings=true"
[2021-10-18T18:46:44.473Z] LOG-MESSAGE: "ready to call LabelResolver.setRuntimeParams(), useCompactEmbeddingsObjectJson={\n "use_compact_embeddings": true\n}"
[2021-10-18T18:46:44.473Z] LOG-MESSAGE: "ready to call Utility.getConfigJson(), LabelResolver.LabelResolver=[object Object]"
Processing D:\src\Akira\src\Akira\AkiraBot\appsettings.json...
Failed to parse LUIS or JSON file on intent/entity labels
Failed to parse D:\src\Akira\src\Akira\AkiraBot\appsettings.json, error=
{}

To Reproduce

Steps to reproduce the behavior:

  1. Create .lu file by using bf luis:version:export
  2. Create .qna files by using bf qnamaker:kb:export
  3. Place the files in CognitiveModels directory
  4. Run the orchestrator command bf orchestrator:create --debug --hierarchical --in ./CognitiveModels --out ./generated --model ./model

Expected behavior

Would like to know clear reason for the failure.

[bug]

@rdivakar rdivakar added bug Indicates an unexpected problem or an unintended behavior. needs-triage The issue has just been created and it has not been reviewed by the team. labels Oct 18, 2021
@tsuwandy
Copy link
Contributor

tsuwandy commented Oct 29, 2021

@rdivakar, I couldn't repro with bf version 4.15.0-rc0

D:\src\BotBuilder-Samples\samples\csharp_dotnetcore\14.nlp-with-orchestrator>bf -v
@microsoft/botframework-cli/4.15.0-rc0 win32-x64 node-v14.17.4

Could you check if you have orchestratorsettings.json file where you run the command, delete the file and try to run the command again?

These from your logs:
bf orchestrator:create --debug --hierarchical --in ./CognitiveModels --out ./generated --model ./model
Error:

[2021-10-18T18:46:43.816Z] LOG-MESSAGE: "refresh=undefined"
[2021-10-18T18:46:43.818Z] LOG-MESSAGE: "baseModelPath=D:\src\Akira\src\Akira\AkiraBot\model"
[2021-10-18T18:46:43.818Z] LOG-MESSAGE: "entityBaseModelPath=D:\src\Akira\src\Akira\AkiraBot\model"
[2021-10-18T18:46:43.818Z] LOG-MESSAGE: "inputPathConfiguration=D:\src\Akira\src\Akira\AkiraBot"

The inputPathConfig doesn't sue what you passed in to the command for some reason.

When I ran this command,
D:\src\BotBuilder-Samples\samples\csharp_dotnetcore\14.nlp-with-orchestrator>bf orchestrator:create --debug --hierarchical --in ./CognitiveModels --out ./generated --model ./model >> log.txt

The inputPathConfiguration in the log matches what I passed in.

[2021-10-29T21:56:23.414Z] LOG-MESSAGE: "inputPathConfiguration=D:\src\BotBuilder-Samples\samples\csharp_dotnetcore\14.nlp-with-orchestrator\CognitiveModels"

@tsuwandy
Copy link
Contributor

tsuwandy commented Nov 4, 2021

@rdivakar, could you try removing orchestratorsettings.json? I think you used to run a few commands bf orchestrator:add (dispatch style commands and the old path was used instead.

@tsuwandy
Copy link
Contributor

tsuwandy commented Nov 4, 2021

I have a fix to always take the path from the input if specified, but for now, removing orchestratorsettings.json will fix the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Indicates an unexpected problem or an unintended behavior. needs-triage The issue has just been created and it has not been reviewed by the team.
Projects
None yet
Development

No branches or pull requests

2 participants