Weatherbot_Tutorial icon indicating copy to clipboard operation
Weatherbot_Tutorial copied to clipboard

Getting issue running nlu_model

Open touhi99 opened this issue 7 years ago • 2 comments

Hi, I am getting the following error, when running the nlu_model.py (Python 3.7)

Traceback (most recent call last): File "nlu_model.py", line 18, in <module> run_nlu() File "nlu_model.py", line 14, in run_nlu print(interpreter.parse("I am planning my holiday to Lithuania. I wonder what is the weather out there.")) File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/rasa_nlu/model.py", line 357, in parse component.process(message, **self.context) File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/rasa_nlu/classifiers/sklearn_intent_classifier.py", line 176, in process intents = self.transform_labels_num2str(intent_ids) File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/rasa_nlu/classifiers/sklearn_intent_classifier.py", line 112, in transform_labels_num2str return self.le.inverse_transform(y) File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/sklearn/preprocessing/label.py", line 273, in inverse_transform y = column_or_1d(y, warn=True) File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/sklearn/utils/validation.py", line 788, in column_or_1d raise ValueError("bad input shape {0}".format(shape)) ValueError: bad input shape (1, 3)

Anyone gives the idea what am I missing?

UPDATE

I checked this error is not giving on python 3.6

Any issue to be solved with python 3.7?

touhi99 avatar Sep 26 '18 22:09 touhi99

Hey @tapos12, thanks for raising the issue. I think some libraries are still not yet updated for Python 3.7 (for example, Tensorflow) and look like sklearn also has some issues with it. Unfortunately, for this to be fixed we have to wait for updates from devs working on these libraries.

JustinaPetr avatar Oct 02 '18 22:10 JustinaPetr

@JustinaPetr I have the same problem with python 3.6.7 and Anaconda 1.9.2

C:\Users..\AppData\Local\Continuum\anaconda3\envs\rasa 3.6 new\lib\importlib_bootstrap.py:219: RuntimeWarning: cymem.cymem.Pool size changed, may indicate binary incompatibility. Expected 48 from C header, got 64 from PyObject return f(*args, **kwds) C:\Users..\AppData\Local\Continuum\anaconda3\envs\rasa 3.6 new\lib\importlib_bootstrap.py:219: RuntimeWarning: cymem.cymem.Address size changed, may indicate binary incompatibility. Expected 24 from C header, got 40 from PyObject return f(*args, **kwds) C:\Users..\AppData\Local\Continuum\anaconda3\envs\rasa 3.6 new\lib\importlib_bootstrap.py:219: RuntimeWarning: cymem.cymem.Pool size changed, may indicate binary incompatibility. Expected 48 from C header, got 64 from PyObject return f(*args, **kwds) C:\Users..\AppData\Local\Continuum\anaconda3\envs\rasa 3.6 new\lib\importlib_bootstrap.py:219: RuntimeWarning: cymem.cymem.Address size changed, may indicate binary incompatibility. Expected 24 from C header, got 40 from PyObject return f(*args, **kwds) C:\Users..\AppData\Local\Continuum\anaconda3\envs\rasa 3.6 new\lib\site-packages\rasa_nlu\extractors\entity_synonyms.py:85: UserWarning: Failed to load synonyms file from './models/nlu/default/weathernlu\entity_synonyms.json' "".format(entity_synonyms_file)) Traceback (most recent call last): File "nlu_model.py", line 18, in run_nlu() File "nlu_model.py", line 14, in run_nlu print(interpreter.parse("I am planning my holiday to Lithuania. I wonder what is the weather out there.")) File "C:\Users..\AppData\Local\Continuum\anaconda3\envs\rasa 3.6 new\lib\site-packages\rasa_nlu\model.py", line 357, in parse component.process(message, **self.context) File "C:\Users..\AppData\Local\Continuum\anaconda3\envs\rasa 3.6 new\lib\site-packages\rasa_nlu\classifiers\sklearn_intent_classifier.py", line 181, in process intents = self.transform_labels_num2str(intent_ids) File "C:\Users..\AppData\Local\Continuum\anaconda3\envs\rasa 3.6 new\lib\site-packages\rasa_nlu\classifiers\sklearn_intent_classifier.py", line 115, in transform_labels_num2str return self.le.inverse_transform(y) File "C:\Users..\AppData\Local\Continuum\anaconda3\envs\rasa 3.6 new\lib\site-packages\sklearn\preprocessing\label.py", line 273, in inverse_transform y = column_or_1d(y, warn=True) File "C:\Users..\AppData\Local\Continuum\anaconda3\envs\rasa 3.6 new\lib\site-packages\sklearn\utils\validation.py", line 788, in column_or_1d raise ValueError("bad input shape {0}".format(shape)) ValueError: bad input shape (1, 3)

Also I have issues with pip and you requiremts.txt because it says: error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": https://visualstudio.microsoft.com/downloads/

and I have the newest build tool.

dunno what I should do.

Root9788 avatar Nov 02 '18 10:11 Root9788