mirror of
https://gitee.com/milvus-io/milvus.git
synced 2024-11-30 10:59:32 +08:00
enhance: Disable HNSW Binary (#31825)
Issue: #31494 Signed-off-by: Cai Yudong <yudong.cai@zilliz.com>
This commit is contained in:
parent
03e0db109e
commit
0d1abb081b
@ -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
|
||||
}
|
||||
|
@ -158,7 +158,7 @@ func Test_hnswChecker_CheckValidDataType(t *testing.T) {
|
||||
},
|
||||
{
|
||||
dType: schemapb.DataType_BinaryVector,
|
||||
errIsNil: true,
|
||||
errIsNil: false,
|
||||
},
|
||||
}
|
||||
|
||||
|
@ -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
|
||||
|
@ -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):
|
||||
"""
|
||||
|
Loading…
Reference in New Issue
Block a user