-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Adding packages for Milvus Online Store (#4854)
Signed-off-by: Francisco Javier Arceo <[email protected]>
- Loading branch information
1 parent
79fa247
commit 49171bd
Showing
10 changed files
with
114 additions
and
12 deletions.
There are no files selected for viewing
Empty file.
12 changes: 12 additions & 0 deletions
12
sdk/python/feast/infra/online_stores/milvus_online_store/milvus_repo_configuration.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
from tests.integration.feature_repos.integration_test_repo_config import ( | ||
IntegrationTestRepoConfig, | ||
) | ||
from tests.integration.feature_repos.universal.online_store.milvus import ( | ||
MilvusOnlineStoreCreator, | ||
) | ||
|
||
FULL_REPO_CONFIGS = [ | ||
IntegrationTestRepoConfig( | ||
online_store="milvus", online_store_creator=MilvusOnlineStoreCreator | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
35 changes: 35 additions & 0 deletions
35
sdk/python/tests/integration/feature_repos/universal/online_store/milvus.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
from typing import Any, Dict | ||
|
||
from testcontainers.milvus import MilvusContainer | ||
|
||
from tests.integration.feature_repos.universal.online_store_creator import ( | ||
OnlineStoreCreator, | ||
) | ||
|
||
|
||
class MilvusOnlineStoreCreator(OnlineStoreCreator): | ||
def __init__(self, project_name: str, **kwargs): | ||
super().__init__(project_name) | ||
self.fixed_port = 19530 | ||
self.container = MilvusContainer("milvusdb/milvus:v2.4.4").with_exposed_ports( | ||
self.fixed_port | ||
) | ||
|
||
def create_online_store(self) -> Dict[str, Any]: | ||
self.container.start() | ||
# Wait for Milvus server to be ready | ||
host = "localhost" | ||
port = self.container.get_exposed_port(self.fixed_port) | ||
return { | ||
"type": "milvus", | ||
"host": host, | ||
"port": int(port), | ||
"index_type": "IVF_FLAT", | ||
"metric_type": "L2", | ||
"embedding_dim": 2, | ||
"vector_enabled": True, | ||
"nlist": 1, | ||
} | ||
|
||
def teardown(self): | ||
self.container.stop() |
Oops, something went wrong.