File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
sdk/python/feast/infra/online_stores/milvus_online_store Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -88,7 +88,7 @@ class MilvusOnlineStoreConfig(FeastConfigBaseModel, VectorStoreConfig):
88
88
"""
89
89
90
90
type : Literal ["milvus" ] = "milvus"
91
- path : Optional [StrictStr ] = "online_store.db "
91
+ path : Optional [StrictStr ] = ""
92
92
host : Optional [StrictStr ] = "localhost"
93
93
port : Optional [int ] = 19530
94
94
index_type : Optional [str ] = "FLAT"
@@ -126,13 +126,16 @@ def _get_db_path(self, config: RepoConfig) -> str:
126
126
127
127
def _connect (self , config : RepoConfig ) -> MilvusClient :
128
128
if not self .client :
129
- if config .provider == "local" :
129
+ if config .provider == "local" and config . online_store . path :
130
130
db_path = self ._get_db_path (config )
131
131
print (f"Connecting to Milvus in local mode using { db_path } " )
132
132
self .client = MilvusClient (db_path )
133
133
else :
134
+ print (
135
+ f"Connecting to Milvus remotely at { config .online_store .host } :{ config .online_store .port } "
136
+ )
134
137
self .client = MilvusClient (
135
- url = f"{ config .online_store .host } :{ config .online_store .port } " ,
138
+ uri = f"{ config .online_store .host } :{ config .online_store .port } " ,
136
139
token = f"{ config .online_store .username } :{ config .online_store .password } "
137
140
if config .online_store .username and config .online_store .password
138
141
else "" ,
You can’t perform that action at this time.
0 commit comments