From f7a4839a8a6b05620985d25cde47b63247a561e7 Mon Sep 17 00:00:00 2001 From: XuanYang-cn Date: Tue, 18 Jun 2024 17:17:52 +0800 Subject: [PATCH] enhance: update milvus-proto and correct index.drop() (#2142) Index name and field name is already there for Index object, No need to get them from kwargs when drop ```python ivf_flat = Index(c, "embeddings", params, index_name="ivf_flat", construct_only=True) ivf_flat.drop() ``` --------- Signed-off-by: yangxuan --- .github/mergify.yml | 6 ++++-- pymilvus/orm/index.py | 7 ++----- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/.github/mergify.yml b/.github/mergify.yml index 42b74125d..3044530a4 100644 --- a/.github/mergify.yml +++ b/.github/mergify.yml @@ -4,10 +4,12 @@ pull_request_rules: - or: - base=master - base~=2\.\d - - "status-success=Run Python Tests (3.8)" + - "status-success=Run Python Tests (3.8, windows-latest)" + - "status-success=Run Python Tests (3.12, windows-latest)" + - "status-success=Run Python Tests (3.8, ubuntu-latest)" + - "status-success=Run Python Tests (3.12, ubuntu-latest)" - "status-success=Run Check Proto (3.8)" - "status-success=Code lint check (3.8)" - - "status-success=Run Python Tests (3.12)" - "status-success=Run Check Proto (3.12)" - "status-success=Code lint check (3.12)" actions: diff --git a/pymilvus/orm/index.py b/pymilvus/orm/index.py index db82abd9a..a158d673a 100644 --- a/pymilvus/orm/index.py +++ b/pymilvus/orm/index.py @@ -73,10 +73,8 @@ def __init__( self._collection = collection self._field_name = field_name self._index_params = index_params - index_name = kwargs.get("index_name", Config.IndexName) - self._index_name = index_name - self._kwargs = kwargs - if self._kwargs.pop("construct_only", False): + self._index_name = kwargs.get("index_name", Config.IndexName) + if kwargs.get("construct_only", False): return conn = self._get_connection() @@ -137,5 +135,4 @@ def drop(self, timeout: Optional[float] = None, **kwargs): field_name=self.field_name, index_name=self.index_name, timeout=timeout, - **kwargs, )