Loading tests/milvus_python_test/test_add_vectors.py +8 −1 Original line number Diff line number Diff line Loading @@ -841,7 +841,12 @@ class TestAddIP: index_param = get_simple_index_params vector = gen_single_vector(dim) status, ids = connect.add_vectors(ip_table, vector) status, mode = connect._cmd("mode") assert status.OK() status = connect.create_index(ip_table, index_param) if str(mode) == "GPU" and (index_param["index_type"] == IndexType.IVF_PQ): assert not status.OK() else: assert status.OK() @pytest.mark.timeout(ADD_TIMEOUT) Loading Loading @@ -870,6 +875,8 @@ class TestAddIP: expected: status ok ''' index_param = get_simple_index_params if index_param["index_type"] == IndexType.IVF_PQ: pytest.skip("Skip some PQ cases") vector = gen_single_vector(dim) status, ids = connect.add_vectors(ip_table, vector) time.sleep(1) Loading tests/milvus_python_test/test_index.py +15 −4 Original line number Diff line number Diff line Loading @@ -629,6 +629,8 @@ class TestIndexIP: ''' index_params = get_simple_index_params logging.getLogger().info(index_params) if index_params["index_type"] == IndexType.IVF_PQ: pytest.skip("Skip some PQ cases") status, ids = connect.add_vectors(ip_table, vectors) status = connect.create_index(ip_table, index_params) logging.getLogger().info(connect.describe_index(ip_table)) Loading Loading @@ -809,8 +811,11 @@ class TestIndexIP: status = connect.create_index(ip_table, index_params) status, result = connect.describe_index(ip_table) logging.getLogger().info(result) assert result._nlist == index_params["nlist"] assert result._table_name == ip_table if index_params["index_type"] == IndexType.IVF_PQ: assert result._index_type == IndexType.FLAT assert result._nlist == 16384 else: assert result._index_type == index_params["index_type"] def test_describe_index_partition(self, connect, ip_table, get_simple_index_params): Loading Loading @@ -976,7 +981,7 @@ class TestIndexIP: assert status.OK() # status, ids = connect.add_vectors(ip_table, vectors) status = connect.create_index(ip_table, index_params) if str(mode) == "GPU" and index_params["index_type"] == IndexType.IVF_PQ: if str(mode) == "GPU" and (index_params["index_type"] == IndexType.IVF_PQ): assert not status.OK() else: assert status.OK() Loading Loading @@ -1111,7 +1116,13 @@ class TestIndexIP: ''' index_params = get_simple_index_params # status, ids = connect.add_vectors(ip_table, vectors) status, mode = connect._cmd("mode") assert status.OK() # status, ids = connect.add_vectors(ip_table, vectors) status = connect.create_index(ip_table, index_params) if str(mode) == "GPU" and (index_params["index_type"] == IndexType.IVF_PQ): assert not status.OK() else: assert status.OK() status, result = connect.describe_index(ip_table) logging.getLogger().info(result) Loading Loading
tests/milvus_python_test/test_add_vectors.py +8 −1 Original line number Diff line number Diff line Loading @@ -841,7 +841,12 @@ class TestAddIP: index_param = get_simple_index_params vector = gen_single_vector(dim) status, ids = connect.add_vectors(ip_table, vector) status, mode = connect._cmd("mode") assert status.OK() status = connect.create_index(ip_table, index_param) if str(mode) == "GPU" and (index_param["index_type"] == IndexType.IVF_PQ): assert not status.OK() else: assert status.OK() @pytest.mark.timeout(ADD_TIMEOUT) Loading Loading @@ -870,6 +875,8 @@ class TestAddIP: expected: status ok ''' index_param = get_simple_index_params if index_param["index_type"] == IndexType.IVF_PQ: pytest.skip("Skip some PQ cases") vector = gen_single_vector(dim) status, ids = connect.add_vectors(ip_table, vector) time.sleep(1) Loading
tests/milvus_python_test/test_index.py +15 −4 Original line number Diff line number Diff line Loading @@ -629,6 +629,8 @@ class TestIndexIP: ''' index_params = get_simple_index_params logging.getLogger().info(index_params) if index_params["index_type"] == IndexType.IVF_PQ: pytest.skip("Skip some PQ cases") status, ids = connect.add_vectors(ip_table, vectors) status = connect.create_index(ip_table, index_params) logging.getLogger().info(connect.describe_index(ip_table)) Loading Loading @@ -809,8 +811,11 @@ class TestIndexIP: status = connect.create_index(ip_table, index_params) status, result = connect.describe_index(ip_table) logging.getLogger().info(result) assert result._nlist == index_params["nlist"] assert result._table_name == ip_table if index_params["index_type"] == IndexType.IVF_PQ: assert result._index_type == IndexType.FLAT assert result._nlist == 16384 else: assert result._index_type == index_params["index_type"] def test_describe_index_partition(self, connect, ip_table, get_simple_index_params): Loading Loading @@ -976,7 +981,7 @@ class TestIndexIP: assert status.OK() # status, ids = connect.add_vectors(ip_table, vectors) status = connect.create_index(ip_table, index_params) if str(mode) == "GPU" and index_params["index_type"] == IndexType.IVF_PQ: if str(mode) == "GPU" and (index_params["index_type"] == IndexType.IVF_PQ): assert not status.OK() else: assert status.OK() Loading Loading @@ -1111,7 +1116,13 @@ class TestIndexIP: ''' index_params = get_simple_index_params # status, ids = connect.add_vectors(ip_table, vectors) status, mode = connect._cmd("mode") assert status.OK() # status, ids = connect.add_vectors(ip_table, vectors) status = connect.create_index(ip_table, index_params) if str(mode) == "GPU" and (index_params["index_type"] == IndexType.IVF_PQ): assert not status.OK() else: assert status.OK() status, result = connect.describe_index(ip_table) logging.getLogger().info(result) Loading