From 1e971a11df788c9d61c437df58060ee72e0fe9e9 Mon Sep 17 00:00:00 2001 From: Francisco Arceo Date: Thu, 29 May 2025 11:35:55 -0400 Subject: [PATCH] Revert "fix: Update milvus connect function to work with remote instance (#5382)" This reverts commit 7e5e7d5ae4de733c98b25e6dd552f706f94ee87a. --- .../infra/online_stores/milvus_online_store/milvus.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/sdk/python/feast/infra/online_stores/milvus_online_store/milvus.py b/sdk/python/feast/infra/online_stores/milvus_online_store/milvus.py index 94203c998bf..58b2218051e 100644 --- a/sdk/python/feast/infra/online_stores/milvus_online_store/milvus.py +++ b/sdk/python/feast/infra/online_stores/milvus_online_store/milvus.py @@ -88,7 +88,7 @@ class MilvusOnlineStoreConfig(FeastConfigBaseModel, VectorStoreConfig): """ type: Literal["milvus"] = "milvus" - path: Optional[StrictStr] = "" + path: Optional[StrictStr] = "online_store.db" host: Optional[StrictStr] = "localhost" port: Optional[int] = 19530 index_type: Optional[str] = "FLAT" @@ -126,16 +126,13 @@ def _get_db_path(self, config: RepoConfig) -> str: def _connect(self, config: RepoConfig) -> MilvusClient: if not self.client: - if config.provider == "local" and config.online_store.path: + if config.provider == "local": db_path = self._get_db_path(config) print(f"Connecting to Milvus in local mode using {db_path}") self.client = MilvusClient(db_path) else: - print( - f"Connecting to Milvus remotely at {config.online_store.host}:{config.online_store.port}" - ) self.client = MilvusClient( - uri=f"{config.online_store.host}:{config.online_store.port}", + url=f"{config.online_store.host}:{config.online_store.port}", token=f"{config.online_store.username}:{config.online_store.password}" if config.online_store.username and config.online_store.password else "",