Comments (5)
@juanandreas I checked and there should be an error in usage. You can refer to the following example:
import time
import numpy as np
from pymilvus import (
MilvusClient,
DataType
)
fmt = "\n=== {:30} ===\n"
dim = 8
collection_name = "hello_milvus10"
milvus_client = MilvusClient("http://localhost:19530")
has_collection = milvus_client.has_collection(collection_name, timeout=5)
if has_collection:
milvus_client.drop_collection(collection_name)
schema = milvus_client.create_schema(enable_dynamic_field=True, partition_key_field="num")
schema.add_field("id", DataType.INT64, is_primary=True)
schema.add_field("embeddings", DataType.FLOAT_VECTOR, dim=dim)
schema.add_field("title", DataType.VARCHAR, max_length=64)
schema.add_field("num", DataType.INT64)
index_params = milvus_client.prepare_index_params()
index_params.add_index(field_name = "embeddings", metric_type="L2")
milvus_client.create_collection(collection_name, schema=schema, index_params=index_params, consistency_level="Strong", num_partitions=16)
print(fmt.format(" all collections "))
print(milvus_client.list_collections())
print(milvus_client.list_partitions(collection_name=collection_name))
from pymilvus.
Thank you! I think the documentation should clarify that num_partitions
argument should be defined at client.create_collection()
, not client.create_schema()
.
Can you share how to write into this collection using do_bulk_insert
? This may be a related bug.
I am currently experiencing:
milvus.do_bulk_insert(collection_name=COLLECTION, files=list_of_files, partition_name=partition_name)
RPC error: [do_bulk_insert], <MilvusException: (code=2100, message=not allow to set partition name for collection with partition key: importing data failed)>
if I exclude the partition_name,
milvus.do_bulk_insert(collection_name=COLLECTION, files=list_of_files)
TypeError: do_bulk_insert() missing 1 required positional argument: 'partition_name'
This seems contradictory.
from pymilvus.
Which package is milvus used here? Is it pymilvus.utility? in milvus.do_bulk_insert
from pymilvus.
Which package is milvus used here? Is it pymilvus.utility? in
milvus.do_bulk_insert
import pymilvus
milvus = pymilvus.Milvus(host=MILVUS_HOST, port=MILVUS_PORT)
milvus.do_bulk_insert(collection_name=COLLECTION, files=list_of_files, partition_name=partition_name)
I am running 2.4.3 of pymilvus and milvus version 2.4.3
from pymilvus.
/assign
from pymilvus.
Related Issues (20)
- [Bug]: Can't create partition in Milvus running on Docker Compose HOT 2
- [Bug]: pymilvus 2.3.5- query iterator got error: grpc_status:13, grpc_message:"Received RST_STREAM with error code 2" HOT 1
- [QUESTION]: 请问hybrid_search中如果有sparse vector的检索,支持partition key吗 HOT 6
- [Bug]: Use Furthest Neighbor Search HOT 1
- [Bug]: ParamError(message=f"`{param_name}` value {param_value} is illegal") HOT 6
- [QUESTION]: Can we have different weights for each collection while doing a similarity search? HOT 1
- [Bug]: Flask debug mode and Milvus Local appear to conflict
- [Bug]: remove limitation clustering key can not be primary key HOT 1
- [Bug]: VRAM Memory leakage embedding documents
- [Bug]: async is not working with collection.search HOT 1
- [Enhancement]: Hide unnecessary fields when outputting HOT 1
- [Bug]: TypeError: Couldn't build proto file into descriptor pool: duplicate file name common.proto HOT 3
- [Bug]: Broken Pipe when mp inserts
- [Enhancement]: Refine max length exceeded error message HOT 5
- [QUESTION]: [describe_collection] retry:10, cost: 3.00s, reason: <_MultiThreadedRendezvous: StatusCode.UNAVAILABLE, failed to connect to all addresses; HOT 4
- [Bug]: Milvus 连接错误: <_InactiveRpcError of RPC that terminated with: status = StatusCode.UNAUTHENTICATED details = "missing authorization in header" debug_error_string = "UNKNOWN:Error received from peer {grpc_message:"missing authorization in header", grpc_status:16, created_time:"2024-07-31T14:52:52.605898+08:00"}" > HOT 5
- [Bug]: <MilvusException: (code=65535, message=the length(38400) of float data should divide the dim(1024))> HOT 1
- [Bug]: connections.connection() uri option isn't documented as creating a local file HOT 1
- [Enhancement]: Rename is_major to is_clustering
- [Bug]: gRPC handler is reraising Exceptions in a way that breaks low-level Python Exception tracking HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pymilvus.