When I insert data into a collection, MilvusClient reports
AttributeError: 'MilvusClient' object has no attribute 'num_partitions'
So I look into the source code and found num_partitions is not defined in MilvusClient
Here in _create_collection is the only function mentions num_partitons . And I commented out num_partitions=self.num_partitions,, It worked.
Expected Behavior
Insert the data into the collection.
Steps/Code To Reproduce behavior
from pymilvus import MilvusClient
import numpy as np
collection_name = 'test'
client = MilvusClient(collection_name, vector_field='emb', overwrite=True)
datas = []
count = 10
for cur in range(count):
temp = {
"emb": np.random.rand(384)
}
datas.append(temp)
client.insert_data(datas)
print(client.num_entities())
Environment details
- Hardware/Softward conditions (OS, CPU, GPU, Memory):
- Method of installation (Docker, or from source):
- Milvus version (v0.3.1, or v0.4.0): Milvus: 2.3.0beta1/Pymilvus: 2.4.0dev38
- Milvus configuration (Settings you made in `server_config.yaml`):
Is there an existing issue for this?
Describe the bug
When I insert data into a collection, MilvusClient reports
AttributeError: 'MilvusClient' object has no attribute 'num_partitions'
So I look into the source code and foundnum_partitions
is not defined in MilvusClientHere in
_create_collection
is the only function mentionsnum_partitons
. And I commented outnum_partitions=self.num_partitions,
, It worked.Expected Behavior
Insert the data into the collection.
Steps/Code To Reproduce behavior
Environment details
Anything else?
No response