milvus: [Bug]: Milvus crashed during building ANNOY index
Is there an existing issue for this?
- I have searched the existing issues
Environment
- Milvus version: both v1.x and v2.0
- Deployment mode(standalone or cluster):
- SDK version(e.g. pymilvus v2.0.0rc2):
- OS(Ubuntu or CentOS):
- CPU/Memory:
- GPU:
- Others:
Current Behavior
Run this script on 2.0:
from pymilvus import (
connections,
list_collections,
FieldSchema, CollectionSchema, DataType,
Collection, Index
)
import numpy as np
# configure milvus hostname and port
print(f"\nCreate connection...")
connections.connect()
# List all collection names
print(f"\nList collections...")
print(list_collections())
# Create a collection named 'demo_film_tutorial'
print(f"\nCreate collection...")
dim = 512
field1 = FieldSchema(name="release_year", dtype=DataType.INT64, description="int64", is_primary=True)
field2 = FieldSchema(name="embedding", dtype=DataType.FLOAT_VECTOR, description="float vector", dim=dim, is_primary=False)
schema = CollectionSchema(fields=[field1, field2], description="collection description")
collection = Collection(name='demo_film_tutorial', data=None, schema=schema)
print(f"\nInsert...")
num = 50000
data = [
[i for i in range(num)],
np.random.random([num, dim]).tolist(),
]
collection.insert(data)
print(collection.num_entities)
print(f"\nCreate index...")
index_params = {"index_type": "ANNOY", "metric_type": "IP", "params": {"n_trees": 10}}
index = Index(collection, "embedding", index_params)
print(index.params)
print([index.params for index in collection.indexes])
Milvus crashed in annoy lib.
Expected Behavior
No response
Steps To Reproduce
No response
Anything else?
No response
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 42 (35 by maintainers)
working on it