Compare commits
5 Commits
main
...
check-with
Author | SHA1 | Date |
---|---|---|
Joan Fontanals Martinez | 60725c5751 | |
Joan Fontanals Martinez | f5ca09bd79 | |
Joan Fontanals Martinez | f71ecf8e52 | |
Joan Fontanals | 095e0cabdc | |
Joan Fontanals Martinez | fb5c5be5d6 |
|
@ -92,9 +92,7 @@ jobs:
|
|||
pip install pytest-timeout
|
||||
pip install flaky
|
||||
pip install .
|
||||
#pip install -U docarray[hnswlib]>=0.33.0
|
||||
pip install git+https://github.com/jina-ai/jina.git@help-investigate
|
||||
pip install git+https://github.com/docarray/docarray.git@main
|
||||
pip install -U docarray[hnswlib]>=0.34.0
|
||||
- name: Test
|
||||
id: test
|
||||
run: |
|
||||
|
@ -126,9 +124,7 @@ jobs:
|
|||
pip install pytest-timeout
|
||||
pip install flaky
|
||||
pip install .
|
||||
#pip install -U docarray[hnswlib]>=0.33.0
|
||||
pip install git+https://github.com/jina-ai/jina.git@help-investigate
|
||||
pip install git+https://github.com/docarray/docarray.git@main
|
||||
pip install -U docarray[hnswlib]>=0.34.0
|
||||
- name: Test
|
||||
id: test
|
||||
run: |
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
jina>=3.17.0
|
||||
jina>=3.18.0
|
||||
click
|
||||
#docarray[hnswlib]>=0.33.0
|
||||
#docarray[hnswlib]>=0.34.0
|
||||
|
|
2
setup.py
2
setup.py
|
@ -56,4 +56,4 @@ setup(
|
|||
)
|
||||
|
||||
import subprocess
|
||||
subprocess.run(['pip', 'install', 'docarray[hnswlib]>=0.33.0'])
|
||||
subprocess.run(['pip', 'install', 'docarray[hnswlib]>=0.34.0'])
|
|
@ -31,7 +31,7 @@ def test_hnswlib_vectordb_batch(docs_to_index, replicas, shards, protocol, tmpdi
|
|||
query = docs_to_index[:10]
|
||||
port = random_port()
|
||||
with HNSWVectorDB[MyDoc].serve(workspace=str(tmpdir), replicas=replicas, shards=shards, protocol=protocol, port=port,
|
||||
uses_with={'ef': 5000}) as db:
|
||||
uses_with={'ef': 5000}, timeout_ready=10000) as db:
|
||||
db.index(inputs=docs_to_index)
|
||||
if replicas > 1:
|
||||
time.sleep(2)
|
||||
|
@ -53,7 +53,7 @@ def test_hnswlib_vectordb_single_query(docs_to_index, limit, replicas, shards, p
|
|||
query = docs_to_index[100]
|
||||
port = random_port()
|
||||
with HNSWVectorDB[MyDoc](ef=5000).serve(workspace=str(tmpdir), replicas=replicas, shards=shards, port=port,
|
||||
protocol=protocol) as db:
|
||||
protocol=protocol, timeout_ready=10000) as db:
|
||||
db.index(inputs=docs_to_index)
|
||||
if replicas > 1:
|
||||
time.sleep(2)
|
||||
|
@ -73,7 +73,7 @@ def test_hnswlib_vectordb_delete(docs_to_index, replicas, shards, protocol, tmpd
|
|||
port = random_port()
|
||||
delete = MyDoc(id=query.id, text='', embedding=np.random.rand(128))
|
||||
with HNSWVectorDB[MyDoc].serve(workspace=str(tmpdir), replicas=replicas, shards=shards, protocol=protocol, port=port,
|
||||
uses_with={'ef': 5000}) as db:
|
||||
uses_with={'ef': 5000}, timeout_ready=10000) as db:
|
||||
db.index(inputs=docs_to_index)
|
||||
if replicas > 1:
|
||||
time.sleep(2)
|
||||
|
@ -103,7 +103,7 @@ def test_hnswlib_vectordb_udpate_text(docs_to_index, replicas, shards, protocol,
|
|||
port = random_port()
|
||||
update = MyDoc(id=query.id, text=query.text + '_changed', embedding=query.embedding)
|
||||
with HNSWVectorDB[MyDoc].serve(workspace=str(tmpdir), replicas=replicas, shards=shards, protocol=protocol, port=port,
|
||||
uses_with={'ef': 5000}) as db:
|
||||
uses_with={'ef': 5000}, timeout_ready=10000) as db:
|
||||
db.index(inputs=docs_to_index)
|
||||
if replicas > 1:
|
||||
time.sleep(2)
|
||||
|
@ -132,7 +132,7 @@ def test_hnswlib_vectordb_restore(docs_to_index, replicas, shards, protocol, tmp
|
|||
port = random_port()
|
||||
|
||||
with HNSWVectorDB[MyDoc](ef=5000).serve(workspace=str(tmpdir), replicas=replicas, shards=shards, port=port,
|
||||
protocol=protocol) as db:
|
||||
protocol=protocol, timeout_ready=10000) as db:
|
||||
db.index(docs=docs_to_index)
|
||||
if replicas > 1:
|
||||
time.sleep(2)
|
||||
|
@ -145,7 +145,7 @@ def test_hnswlib_vectordb_restore(docs_to_index, replicas, shards, protocol, tmp
|
|||
assert res.scores[0] < 0.001 # some precision issues, should be 0.0
|
||||
|
||||
with HNSWVectorDB[MyDoc].serve(workspace=str(tmpdir), replicas=replicas, shards=shards, port=port,
|
||||
protocol=protocol, uses_with={'ef': 5000}) as new_db:
|
||||
protocol=protocol, uses_with={'ef': 5000}, timeout_ready=10000) as new_db:
|
||||
time.sleep(2)
|
||||
resp = new_db.search(docs=query)
|
||||
assert len(resp) == len(query)
|
||||
|
|
|
@ -31,7 +31,7 @@ def test_inmemory_vectordb_batch(docs_to_index, replicas, shards, protocol, tmpd
|
|||
query = docs_to_index[:10]
|
||||
port = random_port()
|
||||
with InMemoryExactNNVectorDB[MyDoc].serve(workspace=str(tmpdir), replicas=replicas, shards=shards, port=port,
|
||||
protocol=protocol) as db:
|
||||
protocol=protocol, timeout_ready=10000) as db:
|
||||
db.index(inputs=docs_to_index)
|
||||
if replicas > 1:
|
||||
time.sleep(2)
|
||||
|
@ -53,7 +53,7 @@ def test_inmemory_vectordb_single_query(docs_to_index, limit, replicas, shards,
|
|||
query = docs_to_index[100]
|
||||
port = random_port()
|
||||
with InMemoryExactNNVectorDB[MyDoc].serve(workspace=str(tmpdir), replicas=replicas, shards=shards, port=port,
|
||||
protocol=protocol) as db:
|
||||
protocol=protocol, timeout_ready=10000) as db:
|
||||
db.index(inputs=docs_to_index)
|
||||
if replicas > 1:
|
||||
time.sleep(2)
|
||||
|
@ -73,7 +73,7 @@ def test_inmemory_vectordb_delete(docs_to_index, replicas, shards, protocol, tmp
|
|||
port = random_port()
|
||||
delete = MyDoc(id=query.id, text='', embedding=np.random.rand(128))
|
||||
with InMemoryExactNNVectorDB[MyDoc].serve(workspace=str(tmpdir), replicas=replicas, shards=shards, port=port,
|
||||
protocol=protocol) as db:
|
||||
protocol=protocol, timeout_ready=10000) as db:
|
||||
db.index(inputs=docs_to_index)
|
||||
if replicas > 1:
|
||||
time.sleep(2)
|
||||
|
@ -103,7 +103,7 @@ def test_inmemory_vectordb_udpate_text(docs_to_index, replicas, shards, protocol
|
|||
port = random_port()
|
||||
update = MyDoc(id=query.id, text=query.text + '_changed', embedding=query.embedding)
|
||||
with InMemoryExactNNVectorDB[MyDoc].serve(workspace=str(tmpdir), replicas=replicas, shards=shards, port=port,
|
||||
protocol=protocol) as db:
|
||||
protocol=protocol, timeout_ready=10000) as db:
|
||||
db.index(inputs=docs_to_index)
|
||||
if replicas > 1:
|
||||
time.sleep(2)
|
||||
|
@ -132,7 +132,7 @@ def test_inmemory_vectordb_restore(docs_to_index, replicas, shards, protocol, tm
|
|||
port = random_port()
|
||||
|
||||
with InMemoryExactNNVectorDB[MyDoc].serve(workspace=str(tmpdir), replicas=replicas, shards=shards, port=port,
|
||||
protocol=protocol) as db:
|
||||
protocol=protocol, timeout_ready=10000) as db:
|
||||
db.index(docs=docs_to_index)
|
||||
if replicas > 1:
|
||||
time.sleep(2)
|
||||
|
@ -145,7 +145,7 @@ def test_inmemory_vectordb_restore(docs_to_index, replicas, shards, protocol, tm
|
|||
assert res.scores[0] > 0.99 # some precision issues, should be 1
|
||||
|
||||
with InMemoryExactNNVectorDB[MyDoc].serve(workspace=str(tmpdir), replicas=replicas, shards=shards, port=port,
|
||||
protocol=protocol) as new_db:
|
||||
protocol=protocol, timeout_ready=10000) as new_db:
|
||||
time.sleep(2)
|
||||
resp = new_db.search(docs=query)
|
||||
assert len(resp) == len(query)
|
||||
|
|
Loading…
Reference in New Issue