Release Note (0.40.0
)
This release contains 1 new feature, 3 bug fixes, and 2 documentation improvements.
🆕 Features
Add Epsilla connector (#1835)
We have integrated Epsilla into DocArray.
Here's a simple example of how to use it:
import numpy as np
from docarray import BaseDoc
from docarray.index import EpsillaDocumentIndex
from docarray.typing import NdArray
from pydantic import Field
class MyDoc(BaseDoc):
text: str
embedding: NdArray[10] = Field(is_embedding=True)
docs = [MyDoc(text=f'text {i}', embedding=np.random.rand(10)) for i in range(10)]
query = np.random.rand(10)
db = EpsillaDocumentIndex[MyDoc]()
db.index(docs)
results = db.find(query, limit=10)
In this example, we create a document class with both textual and numeric data. Then, we initialize an Epsilla-backed document index and use it to index our documents. Finally, we perform a search query.
🐞 Bug Fixes
Fixed type hints error in Python 3.12 (#1840)
DocArray type-hinting is now available for Python 3.12.
Fix issue serializing and deserializing complex schemas (#1836)
There was an issue when serializing and deserializing protobuf
documents with nested documents in dictionaries and other complex structures.
Fix storage issue in TorchTensor class (#1833)
There was a bug when deep-copying a TorchTensor
object if its dtype
was not float32
. This has now been fixed.
📗 Documentation Improvements
- Add Epsilla integration guide (docs(epsilla): add epsilla integration guide #1838)
- Fix sign commit command in docs (docs: fix sign commit commad in docs #1834)
🤟 Contributors
We would like to thank all contributors to this release:
- Tony Yang (@tonyyanga )
- Naymul Islam (@ai-naymul )
- Ben Shaver (@bpshaver )
- Joan Fontanals (@@JoanFM)
- 954 (@954-Ivory )