-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: shiyu22 <shiyu.chen@zilliz.com> Resize img Signed-off-by: shiyu22 <shiyu.chen@zilliz.com>
- Loading branch information
Showing
11 changed files
with
64 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
task-name: "ANN Insert" | ||
description: "The ANN Insert Operator is used to insert embeddings and create ANN indexes for fast similarity searches." | ||
img-credit: "Insert Vectors and Build ANN(Approximate Nearest Neighbor) Index" | ||
img-ref: "https://engineering.fb.com/2017/03/29/data-infrastructure/faiss-a-library-for-efficient-similarity-search/" | ||
operator-implementations: | ||
- milvus: | ||
implementation: "Milvus" | ||
op-name: "ann_insert.milvus" | ||
op-link: "https://towhee.io/ann-insert/milvus" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
```python | ||
import towhee | ||
|
||
towhee.dc['vec'](your_embeddings) \ | ||
.ann_insert.milvus['vec', 'results'](collection=collection) \ | ||
.show() | ||
``` |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
**Parameters:** | ||
|
||
*data: list* | ||
|
||
The embedding data to be inserted. | ||
|
||
|
||
**Returns:** | ||
|
||
*mr* | ||
|
||
Return milvus results with `milvus.insert`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
task-name: "ANN Search" | ||
description: "The ANN search operator is used to find the closest (or most similar) point to a given point in a given set, i.e. find similar embeddings." | ||
img-credit: "ANN(Approximate Nearest Neighbor) Search Algorithm" | ||
img-ref: "https://www.researchgate.net/publication/328484020_Fast_Feature_Matching_Based_on_r-Nearest_k-Means_Searching" | ||
operator-implementations: | ||
- faiss: | ||
implementation: "Faiss" | ||
op-name: "ann_search.faiss" | ||
op-link: "https://towhee.io/ann-search/faiss" | ||
- milvus: | ||
implementation: "Milvus" | ||
op-name: "ann_search.milvus" | ||
op-link: "https://towhee.io/ann-search/milvus" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
```python | ||
import towhee | ||
|
||
towhee.dc['vec'](query) \ | ||
.ann_search.milvus['vec', 'result'](collection=collection) \ | ||
.show() | ||
``` |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
**Parameters:** | ||
|
||
*query: list* | ||
|
||
Query embeddings in Milvus. | ||
|
||
|
||
**Returns:** | ||
|
||
*Entity* | ||
|
||
Return the results in Milvus, such as `id`, `score` or other query fields. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
field-name: "ANN Search" | ||
tasks: | ||
- ann_search | ||
- ann_insert |