Closed e8180kimo closed 5 years ago
@amn41 I've trained rasa nlu. But there is no project
in my folder
My trained mode folder is like this:
--Models
----nlu
------default
--------current
----current
------dialogue
But when I run the server using python -m rasa_nlu.server -c config_spacy.yml --path /models
and curl -XPOST localhost:5000/parse -d '{"q":"motivation"}'
, it returns:
{
"intent": {
"name": null,
"confidence": 1.0
},
"entities": [],
"text": "motivation",
"project": "default",
"model": "fallback"
This is incorrect though.
try with python -m rasa_nlu.server -c config_spacy.yml --path ./Models/nlu
and then
curl -XPOST localhost:5000/parse?model=current -d '{"q":"motivation"}'
@amn41 it returns { "error": "Unable to initialize persistor" }
On the server side:
2018-08-29 10:12:24-0700 [-] RuntimeError: Unable to initialize persistor
2018-08-29 10:12:24-0700 [-] "127.0.0.1" - - [29/Aug/2018:17:12:24 +0000] "GET /parse?q=motivation HTTP/1.1" 500 47 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.106 Safari/537.36"
2018-08-29 10:13:09-0700 [-] 2018-08-29 10:13:09 WARNING rasa_nlu.project - Using default interpreter, couldn't fetch model: Unable to initialize persistor
2018-08-29 10:13:09-0700 [-] 2018-08-29 10:13:09 ERROR __main__ - Unable to initialize persistor
2018-08-29 10:13:09-0700 [-] Traceback (most recent call last):
2018-08-29 10:13:09-0700 [-] File "/Users/wisionlearning/anaconda3/lib/python3.6/site-packages/rasa_nlu/server.py", line 238, in parse
2018-08-29 10:13:09-0700 [-] self.data_router.parse, data))
2018-08-29 10:13:09-0700 [-] File "/Users/wisionlearning/anaconda3/lib/python3.6/site-packages/twisted/python/threadpool.py", line 250, in inContext
2018-08-29 10:13:09-0700 [-] result = inContext.theWork()
2018-08-29 10:13:09-0700 [-] File "/Users/wisionlearning/anaconda3/lib/python3.6/site-packages/twisted/python/threadpool.py", line 266, in <lambda>
2018-08-29 10:13:09-0700 [-] inContext.theWork = lambda: context.call(ctx, func, *args, **kw)
2018-08-29 10:13:09-0700 [-] File "/Users/wisionlearning/anaconda3/lib/python3.6/site-packages/twisted/python/context.py", line 122, in callWithContext
2018-08-29 10:13:09-0700 [-] return self.currentContext().callWithContext(ctx, func, *args, **kw)
2018-08-29 10:13:09-0700 [-] File "/Users/wisionlearning/anaconda3/lib/python3.6/site-packages/twisted/python/context.py", line 85, in callWithContext
2018-08-29 10:13:09-0700 [-] return func(*args,**kw)
2018-08-29 10:13:09-0700 [-] File "/Users/wisionlearning/anaconda3/lib/python3.6/site-packages/rasa_nlu/data_router.py", line 249, in parse
2018-08-29 10:13:09-0700 [-] model)
2018-08-29 10:13:09-0700 [-] File "/Users/wisionlearning/anaconda3/lib/python3.6/site-packages/rasa_nlu/project.py", line 119, in parse
2018-08-29 10:13:09-0700 [-] interpreter = self._interpreter_for_model(model_name)
2018-08-29 10:13:09-0700 [-] File "/Users/wisionlearning/anaconda3/lib/python3.6/site-packages/rasa_nlu/project.py", line 197, in _interpreter_for_model
2018-08-29 10:13:09-0700 [-] metadata = self._read_model_metadata(model_name)
2018-08-29 10:13:09-0700 [-] File "/Users/wisionlearning/anaconda3/lib/python3.6/site-packages/rasa_nlu/project.py", line 212, in _read_model_metadata
2018-08-29 10:13:09-0700 [-] self._load_model_from_cloud(model_name, path)
2018-08-29 10:13:09-0700 [-] File "/Users/wisionlearning/anaconda3/lib/python3.6/site-packages/rasa_nlu/project.py", line 251, in _load_model_from_cloud
2018-08-29 10:13:09-0700 [-] raise RuntimeError("Unable to initialize persistor")
2018-08-29 10:13:09-0700 [-] RuntimeError: Unable to initialize persistor
2018-08-29 10:13:09-0700 [-] "127.0.0.1" - - [29/Aug/2018:17:13:09 +0000] "POST /parse?model=current HTTP/1.1" 500 47 "-" "curl/7.60.0"
2018-08-29 10:13:24-0700 [-] Timing out client: IPv4Address(type='TCP', host='127.0.0.1', port=51392)
same error here
2018-09-11 11:36:49+0530 [-] 2018-09-11 11:36:49 WARNING rasa_nlu.project - Using default interpreter, couldn't fetch model: Unable to initialize persistor
2018-09-11 11:36:49+0530 [-] 2018-09-11 11:36:49 ERROR __main__ - Unable to initialize persistor
In detail
Aech:~ priya$ python -m rasa_nlu.server -c ./r_nlu_tf/config.yml --path ./r_nlu_tf/models/nlu
:0: UserWarning: You do not have a working installation of the service_identity module: 'No module named 'service_identity''. Please install it from <https://pypi.python.org/pypi/service_identity> and make sure all of its dependencies are satisfied. Without the service_identity module, Twisted can perform only rudimentary TLS client hostname verification. Many valid certificate/hostname mappings may be rejected.
/Users/priya/anaconda3/lib/python3.6/importlib/_bootstrap.py:219: RuntimeWarning: compiletime version 3.5 of module 'tensorflow.python.framework.fast_tensor_util' does not match runtime version 3.6
return f(*args, **kwds)
/Users/priya/anaconda3/lib/python3.6/site-packages/h5py/__init__.py:36: FutureWarning: Conversion of the second argument of issubdtype from `float` to `np.floating` is deprecated. In future, it will be treated as `np.float64 == np.dtype(float).type`.
from ._conv import register_converters as _register_converters
2018-09-11 11:35:14+0530 [-] Log opened.
2018-09-11 11:35:14+0530 [-] Site starting on 5000
2018-09-11 11:35:14+0530 [-] Starting factory <twisted.web.server.Site object at 0x18152136d8>
2018-09-11 11:36:49+0530 [-] 2018-09-11 11:36:49 WARNING rasa_nlu.project - Using default interpreter, couldn't fetch model: Unable to initialize persistor
2018-09-11 11:36:49+0530 [-] 2018-09-11 11:36:49 ERROR __main__ - Unable to initialize persistor
2018-09-11 11:36:49+0530 [-] Traceback (most recent call last):
2018-09-11 11:36:49+0530 [-] File "/Users/priya/anaconda3/lib/python3.6/site-packages/rasa_nlu/server.py", line 238, in parse
2018-09-11 11:36:49+0530 [-] self.data_router.parse, data))
2018-09-11 11:36:49+0530 [-] File "/Users/priya/anaconda3/lib/python3.6/site-packages/twisted/python/threadpool.py", line 250, in inContext
2018-09-11 11:36:49+0530 [-] result = inContext.theWork()
2018-09-11 11:36:49+0530 [-] File "/Users/priya/anaconda3/lib/python3.6/site-packages/twisted/python/threadpool.py", line 266, in <lambda>
2018-09-11 11:36:49+0530 [-] inContext.theWork = lambda: context.call(ctx, func, *args, **kw)
2018-09-11 11:36:49+0530 [-] File "/Users/priya/anaconda3/lib/python3.6/site-packages/twisted/python/context.py", line 122, in callWithContext
2018-09-11 11:36:49+0530 [-] return self.currentContext().callWithContext(ctx, func, *args, **kw)
2018-09-11 11:36:49+0530 [-] File "/Users/priya/anaconda3/lib/python3.6/site-packages/twisted/python/context.py", line 85, in callWithContext
2018-09-11 11:36:49+0530 [-] return func(*args,**kw)
2018-09-11 11:36:49+0530 [-] File "/Users/priya/anaconda3/lib/python3.6/site-packages/rasa_nlu/data_router.py", line 242, in parse
2018-09-11 11:36:49+0530 [-] model)
2018-09-11 11:36:49+0530 [-] File "/Users/priya/anaconda3/lib/python3.6/site-packages/rasa_nlu/project.py", line 119, in parse
2018-09-11 11:36:49+0530 [-] interpreter = self._interpreter_for_model(model_name)
2018-09-11 11:36:49+0530 [-] File "/Users/priya/anaconda3/lib/python3.6/site-packages/rasa_nlu/project.py", line 197, in _interpreter_for_model
2018-09-11 11:36:49+0530 [-] metadata = self._read_model_metadata(model_name)
2018-09-11 11:36:49+0530 [-] File "/Users/priya/anaconda3/lib/python3.6/site-packages/rasa_nlu/project.py", line 212, in _read_model_metadata
2018-09-11 11:36:49+0530 [-] self._load_model_from_cloud(model_name, path)
2018-09-11 11:36:49+0530 [-] File "/Users/priya/anaconda3/lib/python3.6/site-packages/rasa_nlu/project.py", line 251, in _load_model_from_cloud
2018-09-11 11:36:49+0530 [-] raise RuntimeError("Unable to initialize persistor")
2018-09-11 11:36:49+0530 [-] RuntimeError: Unable to initialize persistor
2018-09-11 11:36:49+0530 [-] "127.0.0.1" - - [11/Sep/2018:06:06:49 +0000] "POST /parse?model=current HTTP/1.1" 500 47 "-" "curl/7.58.0"
@amn41 can you please look into what's going wrong there?
@venky14 does it work if you specify the project explicitly?
curl -XPOST 'localhost:5000/parse?model=current&project=nlu' -d '{"q":"motivation"}'
Got this
Aech:~ priya$ curl -XPOST 'localhost:5000/parse?model=current&project=nlu' -d '{"q":"motivation"}'
{
"error": "Unable to initialize persistor"
}
same as above error.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
This issue has been automatically closed due to inactivity. Please create a new issue if you need more help.