logo
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Readme
Files and versions

Updated 7 months ago

ann-insert

ANN Insert Operator: Milvus

author: shiyu


Desription

Insert data into Milvus collections. Please make sure you have created Milvus Collection before loading the data.


Code Example

Example

Write the pipeline in simplified style:

import towhee

towhee.dc(your_embeddings) \
    .ann_insert.milvus(uri='tcp://<milvus-host>:<milvus-port>/<collection-name>')

Write a same pipeline with explicit inputs/outputs name specifications:

import towhee

towhee.dc['vec'](your_embeddings) \
    .ann_insert.milvus['vec', 'results'](uri='tcp://<milvus-host>:<milvus-port>/<collection-name>') \
    .show()

Load Collection

Please load the Collection after inserted data.

collection.load()


Factory Constructor

Create the operator via the following factory method:

ann_insert.milvus(collection)


Parameters:

uri: str

The uri for Milvus Collection, such as tcp://<milvus-host>:<milvus-port>/<collection-name>.


Interface

Parameters:

data: list

The embedding data to be inserted.


Returns: mr

Return milvus results with milvus.insert.

More Resources

Jael Gu 919baf2711 Add more resources 11 Commits
file-icon .gitattributes
1.1 KiB
download-icon
Initial commit 3 years ago
file-icon README.md
2.8 KiB
download-icon
Add more resources 7 months ago
file-icon __init__.py
91 B
download-icon
Add ann_insert.milvus 3 years ago
file-icon milvus.py
1.9 KiB
download-icon
Add PyOp as base 3 years ago
file-icon requirements.txt
22 B
download-icon
Add protobuf requirements 3 years ago
file-icon result.png
99 KiB
download-icon
Add ann_insert.milvus 3 years ago