milvus icon indicating copy to clipboard operation
milvus copied to clipboard

[Bug]: In-consistent build index behavior

Open cydrain opened this issue 1 year ago • 3 comments

Is there an existing issue for this?

  • [X] I have searched the existing issues

Environment

- Milvus version: master (f4e96777e)
- Deployment mode(standalone or cluster): cluster
- MQ type(rocksmq, pulsar or kafka):    
- SDK version(e.g. pymilvus v2.0.0rc2):
- OS(Ubuntu or CentOS): ubuntu
- CPU/Memory: 
- GPU: 
- Others:

Current Behavior

Use script "pymilvus/examples/example.py" to create index

def create_index(collection, filed_name):
    index_param = {
        "index_type": _INDEX_TYPE,
        "params": {"nlist": _NLIST, "efConstruction": 100, "M": 8},
        "metric_type": _METRIC_TYPE}
    collection.create_index(filed_name, index_param)
    print("\nCreated index:\n{}".format(collection.index().params))

when select "HNSW" index type, create index successfully; but when select "IVF_FLAT" index, report error:

I20230418 11:03:41.611368 666057 factory.cc:20] [KNOWHERE][Create][milvus] create knowhere index IVF_FLAT
E20230418 11:03:41.611567 666057 config.cc:64] [KNOWHERE][FormatAndCheck][milvus] invalid json key: M
Assert "failed to build index, err: invalid param in json" at /home/caiyd/vec/milvus/internal/core/src/index/VectorMemIndex.cpp:78

Expected Behavior

the build index behavior should be consistent with same param

Steps To Reproduce

No response

Milvus Log

No response

Anything else?

No response

cydrain avatar Apr 18 '23 03:04 cydrain

/assign

cydrain avatar Apr 18 '23 03:04 cydrain

/unassign

yanliang567 avatar Apr 18 '23 08:04 yanliang567

HNSW - create index successfully

CYD1 - key not legal M, status = 1
CYD0 - cannot find key dim, status = 0
CYD1 - key is legal dim, status = 1
CYD1 - key not legal efConstruction, status = 1
CYD0 - cannot find key index_type, status = 0
CYD1 - key is legal index_type, status = 1
CYD1 - key is legal metric_type, status = 1
CYD0 - cannot find key nlist, status = 0
CYD1 - key is legal nlist, status = 1

IVF_FLAT - create index fail

CYD0 - cannot find key M, status = 0
CYD1 - key not legal M, status = 0

cydrain avatar Apr 21 '23 07:04 cydrain

fixed with https://github.com/milvus-io/knowhere/pull/830

cydrain avatar Apr 23 '23 02:04 cydrain

/close

cydrain avatar Apr 23 '23 03:04 cydrain

@cydrain: Closing this issue.

In response to this:

/close

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

sre-ci-robot avatar Apr 23 '23 03:04 sre-ci-robot

will this be in 2.2.X?

xiaofan-luan avatar Apr 23 '23 19:04 xiaofan-luan