Release Note (0.39.0)
This release contains 4 new features, 8 bug fixes, and 7 documentation improvements.
🆕 Features
Support for Pydantic v2 🚀 (#1652)
The biggest feature of this release is full support for Pydantic v2! We are continuing to support Pydantic v1 at the same time.
If you use Pydantic v2, you will need to adapt your DocArray code to the new Pydantic API. Check out their migration guide here.
Pydantic v2 has its core written in Rust and provides significant performance improvements to DocArray: JSON serialization is 240% faster and validation of BaseDoc and DocList with non-native types like TorchTensor
is 20% faster.
Add BaseDocWithoutId (#1803)
A BaseDoc
by default includes an id
field. This can be problematic if you want to build an API that requires a model without this ID field. Therefore, we now provide a BaseDocWithoutId
which is, as its name suggests, is BaseDoc without the ID field.
Please use this Document with caution, BaseDoc is still the base class to use unless you specifically need to remove the ID.
⚠️ BaseDocWithoutId
is not compatible with DocIndex
or any feature requiring a vector database. This is because DocIndex needs the id field to store and retrieve documents.
💣 Breaking change
Remove Jina AI cloud push/pull (#1791)
Jina AI Cloud is being discontinued. Therefore, we are removing the push/pull
feature related to Jina AI cloud.
🐞 Bug Fixes
Fix DocList subscription error
DocList
can be typed from BaseDoc using the following syntax DocList[MyDoc]()
.
In this release, we have fixed a bug that allowed users to specify the type of a DocList
multiple times
Doing DocList[MyDoc1][MyDoc2]
won't work anymore (#1800)
We also fixed a bug that caused a silent failure when users passed DocList
the wrong type, for example DocList[doc()]
. (#1794)
Milvus connection parameter missing (#1802)
We fixed a small bug that incorrectly set the port of the Milvus client.
📗 Documentation Improvements
- Fix Documentation for pydantic v2 (docs: fix documentation for pydantic v2 #1815)
- Adding field descriptions to predefined mesh 3D Document (docs: adding field descriptions to predefined mesh 3D document #1789)
- Adding field descriptions to predefined point cloud 3D Document (docs: adding field descriptions to predefined point cloud 3D document #1792)
- Adding field descriptions to predefined video Document (docs: adding field descriptions to predefined video document #1775)
- Adding field descriptions to predefined text Document (docs: adding field descriptions to predefined text document #1770)
- Adding field descriptions to predefined image Document (docs: adding field descriptions to predefined image document #1772)
- Adding field descriptions to predefined audio Document (docs: adding field descriptions to predefined audio document #1774)
🤟 Contributors
We would like to thank all contributors to this release:
- lvzi (@lvzii )
- Puneeth K (@punndcoder28 )
- Joan Fontanals (@JoanFM )
- samsja (@samsja )