Skip to content

Commit ef161a7

Browse files
author
Joan Fontanals
authored
Merge branch 'main' into fix-is-subclass
2 parents 15f34b8 + e0afb5e commit ef161a7

File tree

14 files changed

+1657
-20
lines changed

14 files changed

+1657
-20
lines changed

.github/workflows/ci.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ jobs:
8686
8787
8888
docarray-test:
89-
needs: [lint-ruff, check-black, import-test]
89+
needs: [import-test]
9090
runs-on: ubuntu-latest
9191
strategy:
9292
fail-fast: false
@@ -131,7 +131,7 @@ jobs:
131131

132132

133133
docarray-test-jac:
134-
needs: [lint-ruff, check-black, import-test]
134+
needs: [import-test]
135135
runs-on: ubuntu-latest
136136
strategy:
137137
fail-fast: false
@@ -162,7 +162,7 @@ jobs:
162162

163163

164164
docarray-test-proto3:
165-
needs: [lint-ruff, check-black, import-test]
165+
needs: [import-test]
166166
runs-on: ubuntu-latest
167167
strategy:
168168
fail-fast: false
@@ -190,13 +190,13 @@ jobs:
190190

191191

192192
docarray-doc-index:
193-
needs: [lint-ruff, check-black, import-test]
193+
needs: [import-test]
194194
runs-on: ubuntu-latest
195195
strategy:
196196
fail-fast: false
197197
matrix:
198198
python-version: [3.8]
199-
db_test_folder: [base_classes, elastic, hnswlib, qdrant, weaviate]
199+
db_test_folder: [base_classes, elastic, hnswlib, qdrant, weaviate, redis]
200200
steps:
201201
- uses: actions/[email protected]
202202
- name: Set up Python ${{ matrix.python-version }}
@@ -221,7 +221,7 @@ jobs:
221221

222222

223223
docarray-elastic-v8:
224-
needs: [lint-ruff, check-black, import-test]
224+
needs: [import-test]
225225
runs-on: ubuntu-latest
226226
strategy:
227227
fail-fast: false
@@ -251,7 +251,7 @@ jobs:
251251
timeout-minutes: 30
252252

253253
docarray-test-tensorflow:
254-
needs: [lint-ruff, check-black, import-test]
254+
needs: [import-test]
255255
runs-on: ubuntu-latest
256256
strategy:
257257
fail-fast: false
@@ -280,7 +280,7 @@ jobs:
280280
timeout-minutes: 30
281281

282282
docarray-test-benchmarks:
283-
needs: [lint-ruff, check-black, import-test]
283+
needs: [import-test]
284284
runs-on: ubuntu-latest
285285
strategy:
286286
fail-fast: false
@@ -304,7 +304,7 @@ jobs:
304304
poetry run pytest -m 'benchmark' tests
305305
timeout-minutes: 30
306306

307-
# just for blocking the merge until all parallel core-test are successful
307+
# just for blocking the merge until all parallel tests are successful
308308
success-all-test:
309309
needs: [docarray-test, docarray-test-proto3, docarray-doc-index, docarray-elastic-v8, docarray-test-tensorflow, docarray-test-benchmarks, import-test, check-black, check-mypy, lint-ruff]
310310
if: always()

README.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ DocArray is a Python library expertly crafted for the [representation](#represen
2222

2323
- :fire: Offers native support for **[NumPy](https://github.com/numpy/numpy)**, **[PyTorch](https://github.com/pytorch/pytorch)**, and **[TensorFlow](https://github.com/tensorflow/tensorflow)**, catering specifically to **model training scenarios**.
2424
- :zap: Based on **[Pydantic](https://github.com/pydantic/pydantic)**, and instantly compatible with web and microservice frameworks like **[FastAPI](https://github.com/tiangolo/fastapi/)** and **[Jina](https://github.com/jina-ai/jina/)**.
25-
- :package: Provides support for vector databases such as **[Weaviate](https://weaviate.io/), [Qdrant](https://qdrant.tech/), [ElasticSearch](https://www.elastic.co/de/elasticsearch/)**, and **[HNSWLib](https://github.com/nmslib/hnswlib)**.
25+
- :package: Provides support for vector databases such as **[Weaviate](https://weaviate.io/), [Qdrant](https://qdrant.tech/), [ElasticSearch](https://www.elastic.co/de/elasticsearch/), [Redis](https://redis.io/)**, and **[HNSWLib](https://github.com/nmslib/hnswlib)**.
2626
- :chains: Allows data transmission as JSON over **HTTP** or as **[Protobuf](https://protobuf.dev/)** over **[gRPC](https://grpc.io/)**.
2727

2828
## Installation
@@ -349,7 +349,7 @@ This is useful for:
349349
- :mag: **Neural search** applications
350350
- :bulb: **Recommender systems**
351351

352-
Currently, Document Indexes support **[Weaviate](https://weaviate.io/)**, **[Qdrant](https://qdrant.tech/)**, **[ElasticSearch](https://www.elastic.co/)**, and **[HNSWLib](https://github.com/nmslib/hnswlib)**, with more to come!
352+
Currently, Document Indexes support **[Weaviate](https://weaviate.io/)**, **[Qdrant](https://qdrant.tech/)**, **[ElasticSearch](https://www.elastic.co/)**, **[Redis](https://redis.io/)**, and **[HNSWLib](https://github.com/nmslib/hnswlib)**, with more to come!
353353

354354
The Document Index interface lets you index and retrieve Documents from multiple vector databases, all with the same user interface.
355355

@@ -421,7 +421,7 @@ They are now called **Document Indexes** and offer the following improvements (s
421421
- **Production-ready:** The new Document Indexes are a much thinner wrapper around the various vector DB libraries, making them more robust and easier to maintain
422422
- **Increased flexibility:** We strive to support any configuration or setting that you could perform through the DB's first-party client
423423

424-
For now, Document Indexes support **[Weaviate](https://weaviate.io/)**, **[Qdrant](https://qdrant.tech/)**, **[ElasticSearch](https://www.elastic.co/)**, and **[HNSWLib](https://github.com/nmslib/hnswlib)**, with more to come.
424+
For now, Document Indexes support **[Weaviate](https://weaviate.io/)**, **[Qdrant](https://qdrant.tech/)**, **[ElasticSearch](https://www.elastic.co/)**, **[Redis](https://redis.io/)**, and **[HNSWLib](https://github.com/nmslib/hnswlib)**, with more to come.
425425

426426
</details>
427427

@@ -775,6 +775,7 @@ Currently, DocArray supports the following vector databases:
775775
- [Weaviate](https://www.weaviate.io/)
776776
- [Qdrant](https://qdrant.tech/)
777777
- [Elasticsearch](https://www.elastic.co/elasticsearch/) v8 and v7
778+
- [Redis](https://redis.io/)
778779
- [HNSWlib](https://github.com/nmslib/hnswlib) as a local-first alternative
779780

780781
An integration of [OpenSearch](https://opensearch.org/) is currently in progress.
@@ -836,6 +837,7 @@ from docarray.index import (
836837
WeaviateDocumentIndex,
837838
QdrantDocumentIndex,
838839
ElasticDocIndex,
840+
RedisDocumentIndex,
839841
)
840842

841843
# Select a suitable backend and initialize it with data

docarray/index/__init__.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
from docarray.index.backends.hnswlib import HnswDocumentIndex # noqa: F401
1414
from docarray.index.backends.qdrant import QdrantDocumentIndex # noqa: F401
1515
from docarray.index.backends.weaviate import WeaviateDocumentIndex # noqa: F401
16+
from docarray.index.backends.redis import RedisDocumentIndex # noqa: F401
1617

1718
__all__ = ['InMemoryExactNNIndex']
1819

@@ -34,6 +35,9 @@ def __getattr__(name: str):
3435
elif name == 'WeaviateDocumentIndex':
3536
import_library('weaviate', raise_error=True)
3637
import docarray.index.backends.weaviate as lib
38+
elif name == 'RedisDocumentIndex':
39+
import_library('redis', raise_error=True)
40+
import docarray.index.backends.redis as lib
3741
else:
3842
raise ImportError(
3943
f'cannot import name \'{name}\' from \'{_get_path_from_docarray_root_level(__file__)}\''

0 commit comments

Comments
 (0)