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:
Branden Chan 2020-11-13 10:35:53 +01:00 committed by GitHub
parent 090a8cf3e9
commit 44230fca45
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 3 deletions

View File

@ -380,7 +380,7 @@ class ElasticsearchDocumentStore(BaseDocumentStore):
}
)
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

View File

@ -6,7 +6,7 @@ gunicorn
pandas
sklearn
psycopg2-binary; sys_platform != 'win32' and sys_platform != 'cygwin'
elasticsearch
elasticsearch>=7.7,<=7.10
elastic-apm
tox
coverage

View File

@ -28,7 +28,7 @@ def test_output(prediction):
def test_no_answer_output(no_answer_prediction):
assert no_answer_prediction is not None
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]["offset_start"] == 0
assert no_answer_prediction["answers"][0]["offset_end"] == 0