Skip to content
This repository was archived by the owner on Jan 15, 2025. It is now read-only.
This repository was archived by the owner on Jan 15, 2025. It is now read-only.

luis:convert does not handle LUIS settings #1100

Closed

Description

Versions

CLI Version: @microsoft/botframework-cli/4.12.0-dev.20210126.0184ff0 win32-x64 node-v12.16.1
Node Version: 12.16.1
Windows 10

Describe the bug

LUIS settings are not being included in the generated JSON which means importing a LU file into LUIS drops the settings. This is a problem because LU file users cannot affect LUIS settings and LUIS exports don't round trip.

To Reproduce

Steps to reproduce the behavior:

  1. Create a LU file foo.lu that includes this in the header:
> !# @app.settings.NormalizePunctuation = true
> !# @app.settings.NormalizeWordForm = true
> !# @app.settings.UseAllTrainingData = true
  1. bf luis:convert -i foo.lu -o foo.json
  2. Open foo.json and you will not see a settings: [] section which means the LUIS settings are dropped.

Expected behavior

You should see this:

 "settings": [
    {
      "name": "NormalizePunctuation",
      "value": "true"
    },
    {
      "name": "NormalizeWordForm",
      "value": "true"
    },
    {
      "name": "UseAllTrainingData",
      "value": "true"
    }
  ]

Anything in the LU file with the > !# @app.PATH = VALUE prefix should be exported to the JSON. The lack of this functionality means you cannot round-trip LUIS models that modify settings. The current LUIS export will include the settings in the exported file.

Additional context

I looked at the repo and it looks like the bf-lu library is part of the CLI which implies that it has the latest bf-lu parser. The part which is missing is to put that into the JSON output when doing build or convert. It looks like only some of the properties like name and culture are being passed through when it should pass through all properties.

[bug]

Activity

  1. added
    bug
    needs-triage
    on Jan 28, 2021
  2. removed
    needs-triage
    on Feb 2, 2021
  3. added
    needs-triage
    on Feb 2, 2021
  4. munozemilio commented on Feb 2, 2021

    @munozemilio
    Contributor

    Fei Chen (@feich-ms) is this something you can take a look at?

  5. added this to the R12 milestone on Feb 2, 2021
  6. scheyal commented on Feb 2, 2021

    @scheyal

    Desire to do in R12 if possible.

  7. feich-ms commented on Feb 3, 2021

    @feich-ms
    Contributor

    Emilio Munoz (@munozemilio) sure, will take a fix soon.
    Eyal (@scheyal) It can target R12.

  8. feich-ms commented on Feb 3, 2021

    @feich-ms
    Contributor

    Hi Chris McConnell (@chrimc62), I just tried the case you described, but could not repro it with my machine. The bf-cli convert command can convert the headers you provided to settings in luis json. The version I used is same with you. I also double checked the luis:build command and the headers are taking effects in luis portal after published with cli. So I'm wondering if I missed some other steps to reproduce it?

    image

  9. removed
    needs-triage
    on Feb 4, 2021
  10. feich-ms commented on Feb 5, 2021

    @feich-ms
    Contributor

    Synced with Chris McConnell (@chrimc62), this can be reproduced with import definitions like below. I will take a fix soon.
    image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

bug

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions