The Wayback Machine - https://web.archive.org/web/20201004193253/https://github.com/microsoft/botframework-cli/issues/698
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 luis:version:export` and `bf luis:version:import` not working properly #698

Closed
as-444 opened this issue Apr 2, 2020 · 15 comments
Closed

Comments

@as-444
Copy link

@as-444 as-444 commented Apr 2, 2020

Versions

What CLI version are you using: 4.8.0
What Nodejs version are you using: v12.14.1
What command-line interpreters are you using: Cmd, Powershell
What OS are you using: Win 10 x64

Describe the bug

I'm having issue exporting a luis version to a json file using bf luis:version:export and then importing this exported version using bf luis:version:import
Error: Failed to import app version: Error: The entity extractor xxxx does not exist in the application version.

When running the export command bf luis:version:export, the file produced seems to have a different format when I compare it to file produced by the web portal. I've also noticed the bf export file has a luis_schema_version set to 6.0.0. However it is set to 4.0.0 in the export from the website & the old Luis Cli, I suspect the schema mismatch is causing my isssues. Can you please fix this bug by defaulting to the latest stable schema (4.0.0?) or add an option which users can set?

To Reproduce

Steps to reproduce the behavior:

  1. Export a luis version: bf luis:version:export --endpoint https://westeurope.api.cognitive.microsoft.com/ --subscriptionKey XXXXXXXXXXXXXXXXXXXX --appId XXXXXXXXXXXXXXXXXXXXXXX --versionId "0.1" -o "exportedApp.json
  2. Import the file created in step 1. bf luis:version:import --endpoint https://westeurope.api.cognitive.microsoft.com/ --subscriptionKey XXXXXXXXXXXXXXXXXXXX --appId XXXXXXXXXXXXXXXXXXXX -i .\exportedApp.json --versionId 0.2
  3. Error message will be displayed:

Expected behavior

I expext if I export a luis version using the bf cli I should be able to import the version it into the same/different app.

[bug]

@munozemilio
Copy link
Member

@munozemilio munozemilio commented Apr 6, 2020

Hello @as-444, thanks for reporting this. Could you explain the steps you followed to create that app? The BF Luis CLI is currently wrapping the following api. If you can share the app you are trying to export Im more than happy to try to reproduce. If it is no possible for you share it, can you try exporting using the link I provided? You can run it in there.

@as-444
Copy link
Author

@as-444 as-444 commented Apr 6, 2020 •

Hi @munozemilio The app was created using the web portal . I am not using the preview portal, so my apps have a luis_schema_version of 4.0.0.
The cli you mention above seems to be using a preview version of the 0.3 api, and using the export command results in a json file with a luis_schema_version of 6.0.0. I have tried to import the file produced by this command but the same error occurs.

I've had another look into this issue and it seems it is an issue with entities which have roles.
I've made a small LUIS app which you should be able to run using my repro steps above.

I'd also like to clarify, when I use the Old LUIS cli to export (luis export version --versionId "0.4" --region westeurope --authoringKey XXXXXXXX --appId XXXXXXXX | Out-File -FilePath "OldCliExport.json" -Encoding UTF8) and import (luis import version --in .\OldCliExport.json --versionId 0.5 --appId XXXXXXXX --region westeurope --authoringKey XXXXXXXX) this LUIS version, it works as expected with no errors. What version of the api is the old cli using?

Luis App

{ "name": "testt", "versionId": "0.4", "desc": "", "culture": "en-us", "intents": [ { "name": "None", "features": [] }, { "name": "TestIntent", "features": [] } ], "entities": [], "closedLists": [], "composites": [], "hierarchicals": [], "patternAnyEntities": [], "regexEntities": [ { "name": "postcode", "regexPattern": "([Gg][Ii][Rr] 0[Aa]{2})|((([A-Za-z][0-9]{1,2})|(([A-Za-z][A-Ha-hJ-Yj-y][0-9]{1,2})|(([A-Za-z][0-9][A-Za-z])|([A-Za-z][A-Ha-hJ-Yj-y][0-9][A-Za-z]?))))\\s?[0-9][A-Za-z]{2})", "roles": [ "originPostcode", "destinationPostcode" ] } ], "prebuiltEntities": [], "regexFeatures": [], "phraselists": [], "patterns": [], "utterances": [ { "text": "hello world", "intent": "None", "entities": [] }, { "text": "to aa1 1aa", "intent": "TestIntent", "entities": [ { "startPos": 3, "endPos": 9, "entity": "postcode", "role": "originPostcode" } ] } ], "luis_schema_version": "6.0.0", "tokenizerVersion": "1.0.0", "settings": [] }

@munozemilio
Copy link
Member

@munozemilio munozemilio commented Apr 9, 2020 •

Hi @as-444, the old api is targeting the v2 endpoint. Thanks for the payload, Im able to reproduce this on the endpoint which means this is coming from the Luis Service, not the CLI tool. I will rise this to the Luis team and get back to you as soon as possible.

@as-444
Copy link
Author

@as-444 as-444 commented Apr 21, 2020

Hi @clearab are you able to provide an update regarding this issue?

@clearab
Copy link

@clearab clearab commented Apr 21, 2020

@cahann
Copy link

@cahann cahann commented Apr 21, 2020 •

I tried to import the JSON file in the LUIS portal and I got an error that there are some fields that there are missing, see below

image

@as-444
Copy link
Author

@as-444 as-444 commented Apr 27, 2020 •

@cahann Did you import it as an app or as a version? I've noticed if you have exported a version from a LUIS app, it can only be imported by an existing app and you can't click the import app, and it'll just error.
@munozemilio, could you share the repro steps you used?

@cleemullins
Copy link
Member

@cleemullins cleemullins commented May 13, 2020

@cahann, who from your team can debug this with Emilio?

@cahann
Copy link

@cahann cahann commented May 13, 2020 •

As far as I can understand the JSON generated is missing a required phrase list feature object.

"phraselists": []

I tried to import it from the app list page. can someone repo steps if the error is not resulting from app import.

@munozemilio
Copy link
Member

@munozemilio munozemilio commented May 13, 2020

Hello @as-444, there is a new Luis schema version. Could you please try again with CLI version 4.9.0?

@as-444
Copy link
Author

@as-444 as-444 commented May 14, 2020

Hi @munozemilio I've updated to cli 4.9.0, seems the export now produces a json with schema version 7.0.0. I still get an issue when trying import this file to another or even the same app.
Failed to import app version: Error: Cannot find the model (postcode) in the specified application version. Can you confirm the bf luis:version:import now uses the same endpoint version to import?

@cahann
Copy link

@cahann cahann commented May 14, 2020

{
"name": "testt",
"versionId": "0.4",
"desc": "",
"culture": "en-us",
"intents": [
{
"name": "None",
"features": []
},
{
"name": "TestIntent",
"features": []
}
],
"entities": [],
"closedLists": [],
"composites": [],
"hierarchicals": [],
"patternAnyEntities": [],
"regex_entities": [
{
"name": "postcode",
"regexPattern": "([Gg][Ii][Rr] 0[Aa]{2})|((([A-Za-z][0-9]{1,2})|(([A-Za-z][A-Ha-hJ-Yj-y][0-9]{1,2})|(([A-Za-z][0-9][A-Za-z])|([A-Za-z][A-Ha-hJ-Yj-y][0-9][A-Za-z]?))))\s?[0-9][A-Za-z]{2})",
"roles": [
"originPostcode",
"destinationPostcode"
]
}
],
"prebuiltEntities": [],
"regex_features": [],
"phraselists": [],
"patterns": [],
"utterances": [
{
"text": "hello world",
"intent": "None",
"entities": []
},
{
"text": "to aa1 1aa",
"intent": "TestIntent",
"entities": [
{
"startPos": 3,
"endPos": 9,
"entity": "postcode",
"role": "originPostcode"
}
]
}
],
"luis_schema_version": "6.0.0",
"tokenizerVersion": "1.0.0",
"settings": []
}

@as-444 can you please try to import the above JSON? Also, can you please explain how did you generate the earlier JSON file?

@gabog
Copy link

@gabog gabog commented May 26, 2020

Hi @as-444, were you able to try Carol's recommendation?

@a-b-r-o-w-n
Copy link
Contributor

@a-b-r-o-w-n a-b-r-o-w-n commented Jun 8, 2020

Closing due to lack of activity. @as-444 please re-open if you are still experiencing this issue.

@a-b-r-o-w-n a-b-r-o-w-n closed this Jun 8, 2020
@clearab clearab moved this from Triage / New to Done in Bot Framework CLI Project Tracking Aug 3, 2020
@hhasenauer
Copy link

@hhasenauer hhasenauer commented Aug 21, 2020

Having the same issue. dispatch model is generated with schema version 4.0.0 while the main language model is using 7.0.0 even though 4.0.0 is defined in the .lu file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.