enhance: Disable HNSW Binary (#31825)

Issue: #31494

Signed-off-by: Cai Yudong <yudong.cai@zilliz.com>
This commit is contained in:
Cai Yudong 2024-04-03 14:53:14 +08:00 committed by GitHub
parent 03e0db109e
commit 0d1abb081b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 5 additions and 4 deletions

View File

@ -32,8 +32,8 @@ func (c hnswChecker) CheckTrain(params map[string]string) error {
func (c hnswChecker) CheckValidDataType(dType schemapb.DataType) error {
// TODO(SPARSE) we'll add sparse vector support in HNSW later in cardinal
if dType != schemapb.DataType_FloatVector && dType != schemapb.DataType_BinaryVector && dType != schemapb.DataType_Float16Vector && dType != schemapb.DataType_BFloat16Vector {
return fmt.Errorf("only support float vector or binary vector")
if dType != schemapb.DataType_FloatVector && dType != schemapb.DataType_Float16Vector && dType != schemapb.DataType_BFloat16Vector {
return fmt.Errorf("HNSW only support float vector data type")
}
return nil
}

View File

@ -158,7 +158,7 @@ func Test_hnswChecker_CheckValidDataType(t *testing.T) {
},
{
dType: schemapb.DataType_BinaryVector,
errIsNil: true,
errIsNil: false,
},
}

View File

@ -3722,7 +3722,7 @@ class TestCollectionSearch(TestcaseBase):
@pytest.mark.tags(CaseLabel.L1)
@pytest.mark.parametrize("metrics", ct.binary_metrics[:2])
@pytest.mark.parametrize("index", ["BIN_FLAT", "BIN_IVF_FLAT", "HNSW"])
@pytest.mark.parametrize("index", ["BIN_FLAT", "BIN_IVF_FLAT"])
def test_search_output_field_vector_after_binary_index(self, metrics, index):
"""
target: test search with output vector field after binary index

View File

@ -389,6 +389,7 @@ class TestCreateCollection(TestBase):
@pytest.mark.parametrize("enable_partition_key", [True])
@pytest.mark.parametrize("dim", [128])
@pytest.mark.parametrize("metric_type", ["JACCARD", "HAMMING"])
@pytest.mark.skip(reason="https://github.com/milvus-io/milvus/issues/31494")
def test_create_collections_binary_vector_datatype(self, dim, auto_id, enable_dynamic_field, enable_partition_key,
metric_type):
"""