RasaHQ / rasa

💬 Open source machine learning framework to automate text- and voice-based conversations: NLU, dialogue management, connect to Slack, Facebook, and more - Create chatbots and voice assistants
https://rasa.com/docs/rasa/
Apache License 2.0
18.9k stars 4.63k forks source link

training gets killed sometimes #483

Closed aswiniS2 closed 7 years ago

aswiniS2 commented 7 years ago
**rasa NLU version** (e.g. `0.10`): **Used backend / pipeline** (`mitie`): **Operating system** (ubuntu): **Issue**: While training it gets stopped(killed). If I try to train the same data again and again(2 to 3 times),its getting trained. I just want to know why the training was killed at sometimes. no of categories : 9 no of samples : 16 **Content of configuration file** (if used & relevant): ```json ```
tmbo commented 7 years ago

Is there an error message you get or some other information you can share with us that makes this reproducible?

aswiniS2 commented 7 years ago

When I do training, it was killed without throwing any error and when I do training after sometime it gets trained. In both cases training data remains the same.Refer both screenshots attached.

10-killed

10-trained

amn41 commented 7 years ago

this looks like an out of memory error. How much ram do you have?

aswiniS2 commented 7 years ago

thanks for your reply @amn41. I have 4GB ram. In general how much RAM is required?

amn41 commented 7 years ago

that should be OK, since you're training with a pretty small data set. Try using top to track the memory while the training runs. But your OS is killing the process, which usually means it's consuming too many resources

aswiniS2 commented 7 years ago

If I want to train more than 200 samples. How much RAM is required?

wrathagom commented 7 years ago

From my understanding the MITIE or Spacy model plus your training data set all have to fit into memory. Plus some overhead. Plus any previously loaded models.

Looks like you may have MySQL running at the same time, which can use a chunk of RAM.

aswiniS2 commented 7 years ago

Thanks @wrathagom . I will increase the RAM and check it.

nguyentony commented 7 years ago

You could increase your swap size.

wrathagom commented 7 years ago

@AP8050 I'm closing, let us know if you weren't able to resolve this issue.

aswiniS2 commented 7 years ago

I increased the Ram from 4GB to 8GB. I have 16 intents with 73 samples and I tracked the memory while the training runs. It didn't consume any other resources. Only Trainingdata.json is created after that the training process gets killed.

wrathagom commented 7 years ago

Okay, to help we're going to need more information, and not in screenshots. Either post in gists or In your response the actual text.

Can you provide:

aswiniS2 commented 7 years ago

I've mailed you the information you asked for, on Aug 01, 2017. Please check with it. @wrathagom

wrathagom commented 7 years ago

I see it now, will try to get some time to play with this today.

aswiniS2 commented 7 years ago

@wrathagom what happened?did you checked with that?

chenxian01 commented 7 years ago

I run into the same problem. Did this fixed?

tmbo commented 7 years ago

I couldn't reproduce this yet, which makes it hard to fix. @chenxian01 are you running the latest version from github?

chenxian01 commented 7 years ago

Yes, I use the latest version. And I tried on my Ubuntu16.04 & Ubuntu17.04. I have 71 examples. When I trained the model, after a long long time, then they will show killed.

tmbo commented 7 years ago

@chenxian01 how much memory are you using and which pipeline is specified in your configuration?

chenxian01 commented 7 years ago

I use 2G memory and pipline is mitie.

tmbo commented 7 years ago

mitie is most likely running out of memory there. either use spacy or use a machine with more memory.

chenxian01 commented 7 years ago

I don't have too much memory in my machine. How much memory is enough? And the entity recognoziton for spacy is not better than mitie, sometimes it will give wrong prediction.

wrathagom commented 7 years ago

@chenxian01 entity recognition for spacy can perform just as well as MITIE, it just needs to be trained properly, which likely just means more training examples.

Memory for MITIE is hard to calculate, but the .dat file it uses is > 1GB. Plus you'll need room to train you're model. I'd say you need at least 2-4 GB of RAM free before starting Rasa. That number increases as your number of intents increases.

wrathagom commented 7 years ago

@AP8050 sorry didn't realize I never responded. Was your training data modified before you sent it to me? There was a missing , on line 262.

I am training right now to see if it succeeds for me.

avi0gaur commented 6 years ago

Hi I see this thread has been closed, I am facing same issue with Spacy_Sklearn, I am running my script on 8gb ram. While calling parse method rasa_nlu is making a sudden spike in CPU, which lead to killing the script specially if you are running it on cloud instance.

yijinsheng commented 5 years ago

I am facing same issue with rasa 1.1.4.my config is `language: "zh"

pipeline:

mohsen202 commented 1 year ago

i have the same problem . please help me