Skip to content

Commit 007f113

Browse files
feat: support milvus (#1681)
Signed-off-by: jupyterjazz <[email protected]> Signed-off-by: maxwelljin2 <[email protected]> Co-authored-by: maxwelljin <[email protected]>
1 parent c96707a commit 007f113

File tree

16 files changed

+1894
-83
lines changed

16 files changed

+1894
-83
lines changed

.github/workflows/ci.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ jobs:
6464
python -m pip install --upgrade pip
6565
python -m pip install poetry
6666
poetry install --without dev
67-
poetry run pip install tensorflow==2.11.0
67+
poetry run pip install tensorflow==2.12.0
6868
poetry run pip install jax
6969
- name: Test basic import
7070
run: poetry run python -c 'from docarray import DocList, BaseDoc'
@@ -198,7 +198,7 @@ jobs:
198198
python -m pip install --upgrade pip
199199
python -m pip install poetry
200200
poetry install --all-extras
201-
poetry run pip install protobuf==3.19.0 # we check that we support 3.19
201+
poetry run pip install protobuf==3.20.0 # we check that we support 3.19
202202
sudo apt-get update
203203
sudo apt-get install --no-install-recommends ffmpeg
204204
- name: Test
@@ -230,7 +230,7 @@ jobs:
230230
fail-fast: false
231231
matrix:
232232
python-version: [3.8]
233-
db_test_folder: [base_classes, elastic, hnswlib, qdrant, weaviate, redis]
233+
db_test_folder: [base_classes, elastic, hnswlib, qdrant, weaviate, redis, milvus]
234234
steps:
235235
- uses: actions/[email protected]
236236
- name: Set up Python ${{ matrix.python-version }}
@@ -242,8 +242,8 @@ jobs:
242242
python -m pip install --upgrade pip
243243
python -m pip install poetry
244244
poetry install --all-extras
245-
poetry run pip install protobuf==3.19.0
246-
poetry run pip install tensorflow==2.11.0
245+
poetry run pip install protobuf==3.20.0
246+
poetry run pip install tensorflow==2.12.0
247247
sudo apt-get update
248248
sudo apt-get install --no-install-recommends ffmpeg
249249
@@ -287,8 +287,8 @@ jobs:
287287
python -m pip install --upgrade pip
288288
python -m pip install poetry
289289
poetry install --all-extras
290-
poetry run pip install protobuf==3.19.0
291-
poetry run pip install tensorflow==2.11.0
290+
poetry run pip install protobuf==3.20.0
291+
poetry run pip install tensorflow==2.12.0
292292
poetry run pip install elasticsearch==8.6.2
293293
sudo apt-get update
294294
sudo apt-get install --no-install-recommends ffmpeg
@@ -332,8 +332,8 @@ jobs:
332332
python -m pip install --upgrade pip
333333
python -m pip install poetry
334334
poetry install --all-extras
335-
poetry run pip install protobuf==3.19.0
336-
poetry run pip install tensorflow==2.11.0
335+
poetry run pip install protobuf==3.20.0
336+
poetry run pip install tensorflow==2.12.0
337337
sudo apt-get update
338338
sudo apt-get install --no-install-recommends ffmpeg
339339

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -624,7 +624,7 @@ Like the [PyTorch approach](#coming-from-pytorch), you can also use DocArray wit
624624
First off, to use DocArray with TensorFlow we first need to install it as follows:
625625

626626
```
627-
pip install tensorflow==2.11.0
627+
pip install tensorflow==2.12.0
628628
pip install protobuf==3.19.0
629629
```
630630

@@ -879,3 +879,4 @@ Both are user-friendly and are best suited to small to medium-sized datasets.
879879
- [Roadmap](https://github.com/docarray/docarray/issues/1714)
880880

881881
> DocArray is a trademark of LF AI Projects, LLC
882+
>

docarray/index/__init__.py

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,17 @@
1414
from docarray.index.backends.qdrant import QdrantDocumentIndex # noqa: F401
1515
from docarray.index.backends.weaviate import WeaviateDocumentIndex # noqa: F401
1616
from docarray.index.backends.redis import RedisDocumentIndex # noqa: F401
17+
from docarray.index.backends.milvus import MilvusDocumentIndex # noqa: F401
1718

18-
__all__ = ['InMemoryExactNNIndex']
19+
__all__ = [
20+
'InMemoryExactNNIndex',
21+
'ElasticDocIndex',
22+
'ElasticV7DocIndex',
23+
'QdrantDocumentIndex',
24+
'WeaviateDocumentIndex',
25+
'RedisDocumentIndex',
26+
'MilvusDocumentIndex',
27+
]
1928

2029

2130
def __getattr__(name: str):
@@ -35,6 +44,9 @@ def __getattr__(name: str):
3544
elif name == 'WeaviateDocumentIndex':
3645
import_library('weaviate', raise_error=True)
3746
import docarray.index.backends.weaviate as lib
47+
elif name == 'MilvusDocumentIndex':
48+
import_library('pymilvus', raise_error=True)
49+
import docarray.index.backends.milvus as lib
3850
elif name == 'RedisDocumentIndex':
3951
import_library('redis', raise_error=True)
4052
import docarray.index.backends.redis as lib

0 commit comments

Comments
 (0)