$ curl -X POST "http://localhost:8000/models/1/faq-qa" -H "accept: application/json" -H "Content-Type: application/json" -d "{\"questions\":[\"How is the virus spreading?\"]}"
Inferencing Samples: 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:00<00:00, 2.07 Batches/s]
[2020-05-08 10:39:42 +0000] [8828] [ERROR] Exception in ASGI application
Traceback (most recent call last):
File "/home/ubuntu/anaconda3/envs/pytorch_p36/lib/python3.6/site-packages/uvicorn/protocols/http/httptools_impl.py", line 385, in run_asgi
result = await app(self.scope, self.receive, self.send)
File "/home/ubuntu/anaconda3/envs/pytorch_p36/lib/python3.6/site-packages/uvicorn/middleware/proxy_headers.py", line 45, in __call__
return await self.app(scope, receive, send)
File "/home/ubuntu/anaconda3/envs/pytorch_p36/lib/python3.6/site-packages/fastapi/applications.py", line 151, in __call__
await super().__call__(scope, receive, send) # pragma: no cover
File "/home/ubuntu/anaconda3/envs/pytorch_p36/lib/python3.6/site-packages/starlette/applications.py", line 102, in __call__
await self.middleware_stack(scope, receive, send)
File "/home/ubuntu/anaconda3/envs/pytorch_p36/lib/python3.6/site-packages/starlette/middleware/errors.py", line 181, in __call__
raise exc from None
File "/home/ubuntu/anaconda3/envs/pytorch_p36/lib/python3.6/site-packages/starlette/middleware/errors.py", line 159, in __call__
await self.app(scope, receive, _send)
File "/home/ubuntu/anaconda3/envs/pytorch_p36/lib/python3.6/site-packages/starlette/middleware/cors.py", line 84, in __call__
await self.simple_response(scope, receive, send, request_headers=headers)
File "/home/ubuntu/anaconda3/envs/pytorch_p36/lib/python3.6/site-packages/starlette/middleware/cors.py", line 140, in simple_response
await self.app(scope, receive, send)
File "/home/ubuntu/anaconda3/envs/pytorch_p36/lib/python3.6/site-packages/starlette/exceptions.py", line 82, in __call__
raise exc from None
File "/home/ubuntu/anaconda3/envs/pytorch_p36/lib/python3.6/site-packages/starlette/exceptions.py", line 71, in __call__
await self.app(scope, receive, sender)
File "/home/ubuntu/anaconda3/envs/pytorch_p36/lib/python3.6/site-packages/starlette/routing.py", line 550, in __call__
await route.handle(scope, receive, send)
File "/home/ubuntu/anaconda3/envs/pytorch_p36/lib/python3.6/site-packages/starlette/routing.py", line 227, in handle
await self.app(scope, receive, send)
File "/home/ubuntu/anaconda3/envs/pytorch_p36/lib/python3.6/site-packages/starlette/routing.py", line 41, in app
response = await func(request)
File "/home/ubuntu/anaconda3/envs/pytorch_p36/lib/python3.6/site-packages/fastapi/routing.py", line 197, in app
dependant=dependant, values=values, is_coroutine=is_coroutine
File "/home/ubuntu/anaconda3/envs/pytorch_p36/lib/python3.6/site-packages/fastapi/routing.py", line 150, in run_endpoint_function
return await run_in_threadpool(dependant.call, **values)
File "/home/ubuntu/anaconda3/envs/pytorch_p36/lib/python3.6/site-packages/starlette/concurrency.py", line 34, in run_in_threadpool
return await loop.run_in_executor(None, func, *args)
File "/home/ubuntu/anaconda3/envs/pytorch_p36/lib/python3.6/concurrent/futures/thread.py", line 56, in run
result = self.fn(*self.args, **self.kwargs)
File "/home/ubuntu/haystack/haystack/api/controller/search.py", line 147, in faq_qa
question=question, top_k_retriever=request.top_k_retriever, filters=request.filters,
File "/home/ubuntu/haystack/haystack/finder.py", line 83, in get_answers_via_similar_questions
documents = self.retriever.retrieve(question, top_k=top_k_retriever, candidate_doc_ids=candidate_doc_ids)
File "/home/ubuntu/haystack/haystack/retriever/elasticsearch.py", line 92, in retrieve
documents = self.document_store.query_by_embedding(query_emb[0], top_k, candidate_doc_ids)
File "/home/ubuntu/haystack/haystack/database/elasticsearch.py", line 186, in query_by_embedding
documents = [self._convert_es_hit_to_document(hit, score_adjustment=-1) for hit in result]
File "/home/ubuntu/haystack/haystack/database/elasticsearch.py", line 186, in <listcomp>
documents = [self._convert_es_hit_to_document(hit, score_adjustment=-1) for hit in result]
File "/home/ubuntu/haystack/haystack/database/elasticsearch.py", line 199, in _convert_es_hit_to_document
query_score=hit["_score"] + score_adjustment if hit["_score"] else None,
File "pydantic/main.py", line 338, in pydantic.main.BaseModel.__init__
pydantic.error_wrappers.ValidationError: 1 validation error for Document
meta -> question_emb
str type expected (type=type_error.str)