🎉 v0.4.0
Jina 0.4.0
We are excited to release Jina 0.4.0. Jina is the easier way to do neural search on the cloud. Highlights of this release include fallbacks if GPU is unavailable, FaissIndexer on GPU, and switching indexers during querying.
Release 0.4.0
⬆️ Major Features and Improvements
Usability
-
Add a new value for the
on_gpu
field. Settingon_gpu: auto
in the yaml configure will first check if a GPU device is available and fallback to CPUs when no GPU is found. #617 -
Improve the accessibility of
jina helloworld
. We add a CLI argument to enable downloading via the proxy. If you are using a proxy to speed up your internet, tryjina helloworld --download-proxy http://127.0.0.1:1087
. Just replace the ip and port with your proxy settings. #595 -
Support to switching between different
Indexers
during querying. A new argument,ref_indexer
, is added for this purpose. With the following yaml config ofIndexer
,NumpyIndexer
is used for indexing andAnnoyIndexer
is used for querying. The supportedIndexer
includesFaissIndexer
,AnnoyIndexer
,NGTIndexer
,NmslibIndexer
,SptagIndexer
, andNumpyIndexer
.!AnnoyIndexer with: ref_indexer: !NumpyIndexer with: index_filename: wrap-npidx
-
Add a new parameter
skip-on-error
for the Pods. This argument is used to set up on which level you want jina to skip the errors. Check out more details at jina docs #570!ImageReader with: skip-on-error: 'EXECUTOR'
Scalability
- Multiple improvements have been made to speed up the performance.
-
Improve the performance of
NumpyIndexer
. Theargsort
function is replaced byargpartion
, which avoids the unnecessary sorting procedure and speed up the querying process. #641 -
Switch to
zmqstream
for the default message handler, which improves the performance of networking. #618 -
Use
uvloop
fromtornado
to improve the event handling speed in the Pods. #615
-
New Executors
-
Add
NGTIndexer
. NGT provides high-speed ANN searches for a large volume of data in high dimensional vector data space. #533!NGTIndexer with: index_filename: index.gz num_threads: 2 metric: 'l2' epsilon: 0.1
-
Add support to running
FaissIndexer
on GPU and a new argumentn_prob
forFaissIndexer
. Check out more details of the usages at our examples. #636 #638!FaissIndexer with: index_filename: index.gz index_key: 'IVF10,PQ4' train_filepath: train.gz distance: 'l2' nprobe: 1
-
Add support for Milvus as a new
Indexer
. Now you can do indexing and querying withMilvusIndexer
. [W.I.P] #651 -
Add
CustomKerasImageEncoder
so that you can use your customized model from keras to encode images in jina. The following yaml config loads the model frompath/to/your/model
and use output of the layer with the name ofawesome/encoding/layer
as embedding results. #563!CustomKerasImageEncoder with: model_path: path/to/your/model layer_name: awesome/encoding/layer
-
Add an argument
search_k
forAnnoyIndexer
. #642!AnnoyIndexer with: index_filename: index.gz metric: 'euclidean' n_trees: 10 search_k: -1
-
Add
FastICAEncoder
for encoding. #590!FastICAEncoder with: output_dim: 32, num_features: 128, whiten: False,
Documentation
- Welcome our evangelist @alexcg1 from New Zealand! He has been working hard on improving document readability, Jina 101, contribution guidelines and README retouches. A new document has been added to guide new contributors. #566
Unit tests
⚠️ Breaking Changes
-
Rename
port_grpc
toport_expose
. Now we’ve support both gRPC and RESTful APIs and thereforeport_grpc
does not live up to its name any longer.port_grpc
will be deprecated in the future version. #598 -
Refactor
ImageReader
to inherit fromBaseDocCrafter
ratherDocSegmenter
. In case that you are usingImageReader
, check out our examples for more details. #627 -
Refactor
Ranker
. TheTopKFilterDriver
is now used to filter out the chunks that do not belong to the top k documents. This driver is attached toRanker
by default. ForDocPbIndexer
andDataURIPbIndexer
,TopKFilterDriver
is removed from the default attachment. With k shards, this will leads to n * k results returned from the indexer when querying. #574 -
Remove the
password_stdin
argument for thejina hub
CLI. #569
🐞Bug Fixes and Other Changes
Flow
- Fix the
search_lines
API for theFlow
#606
Executors
- Add a new argument
truncation_strategy
inBaseTransformerEncoder
to adapt the latest Huggingface Transformers v3.0.0. #623!TransformerTorchEncoder with: pooling_strategy: cls model_name: distilbert-base-cased max_length: 96 truncation_strategy: longest_first
- Add
size
property for the indexers. #581
Drivers
-
Add a new driver
UnaryEncoderDriver
dedicated for testing and debugging. #635 -
Fix the problem of
PublishDriver
. PublishDriver is used to modify the num_parts when the pod is connect to another by the PUB-SUB connection. However, PublishDriver overwrites the original driver of the pod. #569 -
Remove the
if
clauses from theDrivers
. #646
Protos
-
Add
tags
field in the Chunk and Document proto. Thetags
field is a map of strings and is designed to storage the value of the other fields that will be used for the filtering purpose. #574 -
Add
location
field for the Chunks.location
is a list of integers. It can be used to mark the position or string, or the coordinates of an image, or the timestamp of an audio clip. #578
Tests
🙏 Thanks to our Contributors
This release contains contributions from hanxiao, JoanFM, nan-wang, fhaase2, anish2197, alexcg1, BingHo1013, shivam-raj, Morriaty-The-Murderer, festeh, generall, emmaadesile, coolmian, JamesTang616, and YueLiu-jina
🙏 Thanks to our Community
And thanks to all of you out there as well! Without you Jina couldn't do what we do. Your support means a lot to us.
🤝 Work with Jina
Want to work with Jina full-time? Check out our openings on our website.