Skip to content

Commit 164d24b

Browse files
committed
Updating connect function to work with remote instance
Signed-off-by: Fiona Waters <fiwaters6@gmail.com>
1 parent ad69eb5 commit 164d24b

File tree

1 file changed

+3
-2
lines changed
  • sdk/python/feast/infra/online_stores/milvus_online_store

1 file changed

+3
-2
lines changed

sdk/python/feast/infra/online_stores/milvus_online_store/milvus.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,13 +126,14 @@ def _get_db_path(self, config: RepoConfig) -> str:
126126

127127
def _connect(self, config: RepoConfig) -> MilvusClient:
128128
if not self.client:
129-
if config.provider == "local":
129+
if config.provider == "local" and config.online_store.path:
130130
db_path = self._get_db_path(config)
131131
print(f"Connecting to Milvus in local mode using {db_path}")
132132
self.client = MilvusClient(db_path)
133133
else:
134+
print(f"Connecting to Milvus remotely at {config.online_store.host}:{config.online_store.port}")
134135
self.client = MilvusClient(
135-
url=f"{config.online_store.host}:{config.online_store.port}",
136+
uri=f"{config.online_store.host}:{config.online_store.port}",
136137
token=f"{config.online_store.username}:{config.online_store.password}"
137138
if config.online_store.username and config.online_store.password
138139
else "",

0 commit comments

Comments
 (0)