GithubHelp home page GithubHelp logo

Comments (12)

pheel avatar pheel commented on July 30, 2024 1

@nickhamilton1980 thanks for the report and investigation. I was able to reproduce the bug (when one of a project's languages has no NLU examples). 1.3.3-bf.5 was meant to fix a but clearly behavior in multilingual projects had been overlooked. You can expect a fix on Monday the 30th.

from botfront.

znat avatar znat commented on July 30, 2024

Hi @nickhamilton1980 ,
What version are you using?
We had a bug where training without NLU data would get that error. Do you have at less than two intents?
Otherwise, can you explain the steps to reproduce?

from botfront.

aintHuman avatar aintHuman commented on July 30, 2024

I literally downloaded and installed today, so the latest version (0.16.0-rc.8).

Inside the panel, there is a 'chitchat' model, and that trains and executes just fine, a conversation in the right side pane performs as expected.

However, the user defined model/project which is created during botfront init is the one that causes the problem. There are two conversations / stories, ie, the vanilla greet and goodbye, and I have included the sample dialects from the NLU > Chitchat import pre-trained intents.

I cleaned out the docker images, and re-downloaded and installed and the same issue persisted.

Does that clarify?

from botfront.

znat avatar znat commented on July 30, 2024

Can you open .botfront/botfront.yml and replace botfront/rasa-for-botfront:v1.3.3-bf.4 with botfront/rasa-for-botfront:v1.3.3-bf.5 in the current section? Then botfront down and botfront up.
Let me know if it solves the issue

from botfront.

aintHuman avatar aintHuman commented on July 30, 2024

Ah thanks, but no it doesn't I am sorry to say:

botfront-rasa   | 2019-09-27 23:02:04 INFO     rasa.nlu.model  - Successfully saved model into '/tmp/tmpog0nb__e/nlu-en'
botfront-rasa   | 2019-09-27 23:02:04 DEBUG    rasa.server  - Traceback (most recent call last):
botfront-rasa   |   File "/usr/local/lib/python3.6/site-packages/rasa/server.py", line 691, in train
botfront-rasa   |     persist_nlu_training_data=True,
botfront-rasa   |   File "/usr/local/lib/python3.6/asyncio/coroutines.py", line 110, in __next__
botfront-rasa   |     return self.gen.send(None)
botfront-rasa   |   File "/usr/local/lib/python3.6/site-packages/rasa/train.py", line 94, in train_async
botfront-rasa   |     kwargs,
botfront-rasa   |   File "/usr/local/lib/python3.6/asyncio/coroutines.py", line 110, in __next__
botfront-rasa   |     return self.gen.send(None)
botfront-rasa   |   File "/usr/local/lib/python3.6/site-packages/rasa/train.py", line 186, in _train_async_internal
botfront-rasa   |     kwargs=kwargs,
botfront-rasa   |   File "/usr/local/lib/python3.6/asyncio/coroutines.py", line 110, in __next__
botfront-rasa   |     return self.gen.send(None)
botfront-rasa   |   File "/usr/local/lib/python3.6/site-packages/rasa/train.py", line 236, in _do_training
botfront-rasa   |     persist_nlu_training_data=persist_nlu_training_data,
botfront-rasa   |   File "/usr/local/lib/python3.6/asyncio/coroutines.py", line 110, in __next__
botfront-rasa   |     return self.gen.send(None)
botfront-rasa   |   File "/usr/local/lib/python3.6/site-packages/rasa/train.py", line 477, in _train_nlu_with_validated_data
botfront-rasa   |     persist_nlu_training_data=persist_nlu_training_data,
botfront-rasa   |   File "/usr/local/lib/python3.6/asyncio/coroutines.py", line 110, in __next__
botfront-rasa   |     return self.gen.send(None)
botfront-rasa   |   File "/usr/local/lib/python3.6/site-packages/rasa/nlu/train.py", line 75, in train
botfront-rasa   |     training_data = await data.get_nlu_data(nlu_config.data)
botfront-rasa   |   File "/usr/local/lib/python3.6/asyncio/coroutines.py", line 110, in __next__
botfront-rasa   |     return self.gen.send(None)
botfront-rasa   |   File "/usr/local/lib/python3.6/site-packages/rasa_addons/importers/botfront.py", line 78, in get_nlu_data
botfront-rasa   |     return utils.training_data_from_paths([self.nlu_config[lang]['path']], 'xx')
botfront-rasa   |   File "/usr/local/lib/python3.6/site-packages/rasa/importers/utils.py", line 9, in training_data_from_paths
botfront-rasa   |     training_datas = [loading.load_data(nlu_file, language) for nlu_file in paths]
botfront-rasa   |   File "/usr/local/lib/python3.6/site-packages/rasa/importers/utils.py", line 9, in <listcomp>
botfront-rasa   |     training_datas = [loading.load_data(nlu_file, language) for nlu_file in paths]
botfront-rasa   |   File "/usr/local/lib/python3.6/site-packages/rasa/nlu/training_data/loading.py", line 67, in load_data
botfront-rasa   |     data_sets = [_load(f, language) for f in files]
botfront-rasa   |   File "/usr/local/lib/python3.6/site-packages/rasa/nlu/training_data/loading.py", line 67, in <listcomp>
botfront-rasa   |     data_sets = [_load(f, language) for f in files]
botfront-rasa   |   File "/usr/local/lib/python3.6/site-packages/rasa/nlu/training_data/loading.py", line 133, in _load
botfront-rasa   |     raise ValueError("Unknown data format for file '{}'.".format(filename))
botfront-rasa   | ValueError: Unknown data format for file '/tmp/tmp00727xbf/nlu/de.md'.
botfront-rasa   |
botfront-app    | { Error: Request failed with status code 500

from botfront.

znat avatar znat commented on July 30, 2024

In the current version, we are aware of this issue, but it only occurs when there is no NLU training data. As soon as you add 2 intents (e.g. from chitchat) it should work.
We'll keep looking

from botfront.

aintHuman avatar aintHuman commented on July 30, 2024

I presume by 2 intents, you actually mean 2 training examples per intent.

2 intents would be [1] chitchat.hi, and [2] chitchat.bye

2 training examples would be (not sure how to format it here, but I think you will get the point):
[1] chitchat.hi

hello
hi there

[2] chitchat.bye

bye
cya

Anyway, I have 3 intents and each have 3 training examples. I had originally pulled in ALL the sample chitchat pre-trained examples, but decided to remove them to help pinpoint the issue.

In either situation, the same error persisted in my case, whether there is lots of training data or not.

from botfront.

aintHuman avatar aintHuman commented on July 30, 2024

Ok. So I may have tracked down the problem, if you are interested in my assessment. In the above error, there is some remarks about list comprehension, and languages, so I decided to untar the .tar.gz model files, and see if there were any key differences, between models which train OK, and ones that do not.

Below I am looking at the domain.yml file for good/bad models after training, below there are 3 examples:

Case 1: Chitchat project that we know to work

Note the empty array [] for fr in every utterance. (I have annotated with ##<<<<< HERE)

templates:
  utter_bye:
    en:
    - text: Bye
    fr: []     ##<<<<<<<<<<<<<<<<<<<<<<< HERE
  utter_get_started:
    en:
    - text: Lets get started
    fr: []    ##<<<<<<<<<<<<<<<<<<<<<<< HERE
  utter_hi:
    en:
    - text: Hi
    fr: []    ##<<<<<<<<<<<<<<<<<<<<<<< HERE
  utter_no_thankyou:
    en:
    - text: No thankyou
    fr: []    ##<<<<<<<<<<<<<<<<<<<<<<< HERE

Case 2 My first project (the problem one above) that fails to train:

I had several languages selected, even though I was only using english, I decided to look into that one. Note that there is no 'empty array' specified for languages de and nl, in 2/4 of the utterances. (I have annotated whtere the de:[] and nl:[] are present, and also market where they are missing)

templates:
  utter_bye:
    en:
    - text: Bye
                 ##<<<<<<<<<<<<<<<<<<<<<<< There is NO de:[] or nl:[]
  utter_default:
    de: []    ##<<<<<<<<<<<<<<<<<<<<<<< HERE 
    en:
    - text: I am not sure I understand you
    nl: []     ##<<<<<<<<<<<<<<<<<<<<<<< HERE
  utter_get_started:
    en:
    - text: Lets Get Started
                ##<<<<<<<<<<<<<<<<<<<<<<< There is NO de:[] or nl:[]
  utter_hi:
    en:
    - text: Hi
                ##<<<<<<<<<<<<<<<<<<<<<<< There is NO de:[] or nl:[]

Case 3 A new project that I was able to get working, training etc...

I created a FRESH project, and was careful to ONLY select english. This project trained as expected. Note there are no empty language arrays.

templates:
  utter_bye:
    en:
    - text: Bye
  utter_default:
    en:
    - text: Please clarify
  utter_get_started:
    en:
    - text: Ok lets get started
  utter_hi:
    en:
    - text: Hi

So could it be that the error in this bug report, comes when there is the presence of empty language arrays in SOME but not ALL of the templates outlined in the domain.yml file??

On a side note, I was unable to REMOVE languages from inside the dashboard, even via going to NLU > Settings > Delete as suggested somewhere inside the dashboard.

from botfront.

znat avatar znat commented on July 30, 2024

@pheel can you confirm if there's something wrong with the format?
Regarding deleting a language, you can only delete a language when it's not set as default
Since you already unzipped de model, can you post the contents of nlu files?

from botfront.

aintHuman avatar aintHuman commented on July 30, 2024

"Regarding deleting a language, you can only delete a language when it's not set as default" -- Yes, I understand, unfortunately, its not letting me delete ANY languages, default or not.

For the above, attached are the training data for Case 1 and 3. Case 2, although I have provided training data via the dashboard, it does not seem to be included in the tar.gz file.

Note that with the attached, I had to rename the extension to .txt. Can you believe Github wouldn't let .json files be attached? Nice work github.

Case3_MyModel_EN.txt
Case1_ChitChat_FR.txt
Case1_ChitChat_EN.txt

from botfront.

aintHuman avatar aintHuman commented on July 30, 2024

Wonderful, great news. Thankyou.

Cheers,

NH

from botfront.

pheel avatar pheel commented on July 30, 2024

Fixed in https://github.com/botfront/rasa-for-botfront/releases/tag/v1.3.7-bf.1

from botfront.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.