mirror of
https://github.com/deepset-ai/haystack.git
synced 2025-12-06 03:47:22 +00:00
Fix CI bug due to new Elasticsearch release and new model release (#579)
* Cast generator to list * Restrict ES version range * Loosen ES requirement * Change no_answer_test value
This commit is contained in:
parent
090a8cf3e9
commit
44230fca45
@ -380,7 +380,7 @@ class ElasticsearchDocumentStore(BaseDocumentStore):
|
|||||||
}
|
}
|
||||||
)
|
)
|
||||||
body["query"]["bool"]["filter"] = filter_clause
|
body["query"]["bool"]["filter"] = filter_clause
|
||||||
result = scan(self.client, query=body, index=index)
|
result = list(scan(self.client, query=body, index=index))
|
||||||
|
|
||||||
return result
|
return result
|
||||||
|
|
||||||
|
|||||||
@ -6,7 +6,7 @@ gunicorn
|
|||||||
pandas
|
pandas
|
||||||
sklearn
|
sklearn
|
||||||
psycopg2-binary; sys_platform != 'win32' and sys_platform != 'cygwin'
|
psycopg2-binary; sys_platform != 'win32' and sys_platform != 'cygwin'
|
||||||
elasticsearch
|
elasticsearch>=7.7,<=7.10
|
||||||
elastic-apm
|
elastic-apm
|
||||||
tox
|
tox
|
||||||
coverage
|
coverage
|
||||||
|
|||||||
@ -28,7 +28,7 @@ def test_output(prediction):
|
|||||||
def test_no_answer_output(no_answer_prediction):
|
def test_no_answer_output(no_answer_prediction):
|
||||||
assert no_answer_prediction is not None
|
assert no_answer_prediction is not None
|
||||||
assert no_answer_prediction["question"] == "What is the meaning of life?"
|
assert no_answer_prediction["question"] == "What is the meaning of life?"
|
||||||
assert math.isclose(no_answer_prediction["no_ans_gap"], -14.4729533, rel_tol=0.0001)
|
assert math.isclose(no_answer_prediction["no_ans_gap"], -13.048564434051514, rel_tol=0.0001)
|
||||||
assert no_answer_prediction["answers"][0]["answer"] is None
|
assert no_answer_prediction["answers"][0]["answer"] is None
|
||||||
assert no_answer_prediction["answers"][0]["offset_start"] == 0
|
assert no_answer_prediction["answers"][0]["offset_start"] == 0
|
||||||
assert no_answer_prediction["answers"][0]["offset_end"] == 0
|
assert no_answer_prediction["answers"][0]["offset_end"] == 0
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user