deeppavlov / intent_classifier

Apache License 2.0
83 stars 31 forks source link

RuntimeError: No pretrained fasttext intent_model provided #3

Closed ilivans closed 6 years ago

ilivans commented 6 years ago

train.py script with default configuration file config.json raises the next error:

Traceback (most recent call last):
  File "train.py", line 49, in <module>
    model = KerasMulticlassModel(opt)
  File "/home/ilivans/projects/intent_classifier/intent_model/multiclass.py", line 73, in __init__
    embedding_url='http://lnsigo.mipt.ru/export/intent/reddit_fasttext_model.tar.gz')
  File "/home/ilivans/projects/intent_classifier/intent_model/embedding_inferable.py", line 38, in __init__
    self.load(embedding_fname, embedding_url)
  File "/home/ilivans/projects/intent_classifier/intent_model/embedding_inferable.py", line 83, in load
    raise RuntimeError('No pretrained fasttext intent_model provided')
RuntimeError: No pretrained fasttext intent_model provided

I thought it should download the fasttext model and it actually goes through this line but fails here requiring embedding file name. It looks like the problem can be solved just by passing embedding_fname argument to the EmbeddingInferableModel constructor.

dilyararimovna commented 6 years ago

Thank you! This is already fixed. I also provided embedding file for pre-trained model on SNIPS dataset.