Skip to content

Commit 49171bd

Browse files
feat: Adding packages for Milvus Online Store (feast-dev#4854)
Signed-off-by: Francisco Javier Arceo <farceo@redhat.com>
1 parent 79fa247 commit 49171bd

File tree

10 files changed

+114
-12
lines changed

10 files changed

+114
-12
lines changed

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

Whitespace-only changes.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
from tests.integration.feature_repos.integration_test_repo_config import (
2+
IntegrationTestRepoConfig,
3+
)
4+
from tests.integration.feature_repos.universal.online_store.milvus import (
5+
MilvusOnlineStoreCreator,
6+
)
7+
8+
FULL_REPO_CONFIGS = [
9+
IntegrationTestRepoConfig(
10+
online_store="milvus", online_store_creator=MilvusOnlineStoreCreator
11+
),
12+
]

sdk/python/requirements/py3.10-ci-requirements.txt

+20-3
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,8 @@ elasticsearch==8.16.0
180180
# via feast (setup.py)
181181
entrypoints==0.4
182182
# via altair
183+
environs==9.5.0
184+
# via pymilvus
183185
exceptiongroup==1.2.2
184186
# via
185187
# anyio
@@ -275,6 +277,7 @@ grpcio==1.68.0
275277
# grpcio-status
276278
# grpcio-testing
277279
# grpcio-tools
280+
# pymilvus
278281
# qdrant-client
279282
grpcio-health-checking==1.62.3
280283
# via feast (setup.py)
@@ -443,13 +446,17 @@ markupsafe==3.0.2
443446
# nbconvert
444447
# werkzeug
445448
marshmallow==3.23.1
446-
# via great-expectations
449+
# via
450+
# environs
451+
# great-expectations
447452
matplotlib-inline==0.1.7
448453
# via
449454
# ipykernel
450455
# ipython
451456
mdurl==0.1.2
452457
# via markdown-it-py
458+
milvus-lite==2.4.10
459+
# via pymilvus
453460
minio==7.1.0
454461
# via feast (setup.py)
455462
mistune==3.0.2
@@ -548,6 +555,7 @@ pandas==2.2.3
548555
# google-cloud-bigquery
549556
# great-expectations
550557
# ibis-framework
558+
# pymilvus
551559
# snowflake-connector-python
552560
pandocfilters==1.5.1
553561
# via nbconvert
@@ -614,6 +622,7 @@ protobuf==4.25.5
614622
# grpcio-tools
615623
# mypy-protobuf
616624
# proto-plus
625+
# pymilvus
617626
# substrait
618627
psutil==5.9.0
619628
# via
@@ -658,7 +667,7 @@ pybindgen==0.22.1
658667
# via feast (setup.py)
659668
pycparser==2.22
660669
# via cffi
661-
pydantic==2.10.1
670+
pydantic==2.10.2
662671
# via
663672
# feast (setup.py)
664673
# fastapi
@@ -679,6 +688,8 @@ pyjwt[crypto]==2.10.0
679688
# msal
680689
# singlestoredb
681690
# snowflake-connector-python
691+
pymilvus==2.4.9
692+
# via feast (setup.py)
682693
pymssql==2.3.2
683694
# via feast (setup.py)
684695
pymysql==1.1.1
@@ -738,7 +749,9 @@ python-dateutil==2.9.0.post0
738749
# pandas
739750
# trino
740751
python-dotenv==1.0.1
741-
# via uvicorn
752+
# via
753+
# environs
754+
# uvicorn
742755
python-json-logger==2.0.7
743756
# via jupyter-events
744757
python-keycloak==4.2.2
@@ -839,6 +852,7 @@ setuptools==75.6.0
839852
# jupyterlab
840853
# kubernetes
841854
# pip-tools
855+
# pymilvus
842856
# singlestoredb
843857
singlestoredb==1.7.2
844858
# via feast (setup.py)
@@ -939,6 +953,7 @@ tqdm==4.67.1
939953
# via
940954
# feast (setup.py)
941955
# great-expectations
956+
# milvus-lite
942957
traitlets==5.14.3
943958
# via
944959
# comm
@@ -1018,6 +1033,8 @@ tzlocal==5.2
10181033
# via
10191034
# great-expectations
10201035
# trino
1036+
ujson==5.10.0
1037+
# via pymilvus
10211038
uri-template==1.3.0
10221039
# via jsonschema
10231040
urllib3==2.2.3

sdk/python/requirements/py3.10-requirements.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ pyarrow==18.0.0
9595
# via
9696
# feast (setup.py)
9797
# dask-expr
98-
pydantic==2.10.1
98+
pydantic==2.10.2
9999
# via
100100
# feast (setup.py)
101101
# fastapi

sdk/python/requirements/py3.11-ci-requirements.txt

+20-3
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,8 @@ elasticsearch==8.16.0
178178
# via feast (setup.py)
179179
entrypoints==0.4
180180
# via altair
181+
environs==9.5.0
182+
# via pymilvus
181183
execnet==2.1.1
182184
# via pytest-xdist
183185
executing==2.1.0
@@ -268,6 +270,7 @@ grpcio==1.68.0
268270
# grpcio-status
269271
# grpcio-testing
270272
# grpcio-tools
273+
# pymilvus
271274
# qdrant-client
272275
grpcio-health-checking==1.62.3
273276
# via feast (setup.py)
@@ -434,13 +437,17 @@ markupsafe==3.0.2
434437
# nbconvert
435438
# werkzeug
436439
marshmallow==3.23.1
437-
# via great-expectations
440+
# via
441+
# environs
442+
# great-expectations
438443
matplotlib-inline==0.1.7
439444
# via
440445
# ipykernel
441446
# ipython
442447
mdurl==0.1.2
443448
# via markdown-it-py
449+
milvus-lite==2.4.10
450+
# via pymilvus
444451
minio==7.1.0
445452
# via feast (setup.py)
446453
mistune==3.0.2
@@ -539,6 +546,7 @@ pandas==2.2.3
539546
# google-cloud-bigquery
540547
# great-expectations
541548
# ibis-framework
549+
# pymilvus
542550
# snowflake-connector-python
543551
pandocfilters==1.5.1
544552
# via nbconvert
@@ -605,6 +613,7 @@ protobuf==4.25.5
605613
# grpcio-tools
606614
# mypy-protobuf
607615
# proto-plus
616+
# pymilvus
608617
# substrait
609618
psutil==5.9.0
610619
# via
@@ -649,7 +658,7 @@ pybindgen==0.22.1
649658
# via feast (setup.py)
650659
pycparser==2.22
651660
# via cffi
652-
pydantic==2.10.1
661+
pydantic==2.10.2
653662
# via
654663
# feast (setup.py)
655664
# fastapi
@@ -670,6 +679,8 @@ pyjwt[crypto]==2.10.0
670679
# msal
671680
# singlestoredb
672681
# snowflake-connector-python
682+
pymilvus==2.4.9
683+
# via feast (setup.py)
673684
pymssql==2.3.2
674685
# via feast (setup.py)
675686
pymysql==1.1.1
@@ -729,7 +740,9 @@ python-dateutil==2.9.0.post0
729740
# pandas
730741
# trino
731742
python-dotenv==1.0.1
732-
# via uvicorn
743+
# via
744+
# environs
745+
# uvicorn
733746
python-json-logger==2.0.7
734747
# via jupyter-events
735748
python-keycloak==4.2.2
@@ -830,6 +843,7 @@ setuptools==75.6.0
830843
# jupyterlab
831844
# kubernetes
832845
# pip-tools
846+
# pymilvus
833847
# singlestoredb
834848
singlestoredb==1.7.2
835849
# via feast (setup.py)
@@ -920,6 +934,7 @@ tqdm==4.67.1
920934
# via
921935
# feast (setup.py)
922936
# great-expectations
937+
# milvus-lite
923938
traitlets==5.14.3
924939
# via
925940
# comm
@@ -994,6 +1009,8 @@ tzlocal==5.2
9941009
# via
9951010
# great-expectations
9961011
# trino
1012+
ujson==5.10.0
1013+
# via pymilvus
9971014
uri-template==1.3.0
9981015
# via jsonschema
9991016
urllib3==2.2.3

sdk/python/requirements/py3.11-requirements.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ pyarrow==18.0.0
9393
# via
9494
# feast (setup.py)
9595
# dask-expr
96-
pydantic==2.10.1
96+
pydantic==2.10.2
9797
# via
9898
# feast (setup.py)
9999
# fastapi

sdk/python/requirements/py3.9-ci-requirements.txt

+20-3
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,8 @@ elasticsearch==8.16.0
182182
# via feast (setup.py)
183183
entrypoints==0.4
184184
# via altair
185+
environs==9.5.0
186+
# via pymilvus
185187
exceptiongroup==1.2.2
186188
# via
187189
# anyio
@@ -277,6 +279,7 @@ grpcio==1.68.0
277279
# grpcio-status
278280
# grpcio-testing
279281
# grpcio-tools
282+
# pymilvus
280283
# qdrant-client
281284
grpcio-health-checking==1.62.3
282285
# via feast (setup.py)
@@ -452,13 +455,17 @@ markupsafe==3.0.2
452455
# nbconvert
453456
# werkzeug
454457
marshmallow==3.23.1
455-
# via great-expectations
458+
# via
459+
# environs
460+
# great-expectations
456461
matplotlib-inline==0.1.7
457462
# via
458463
# ipykernel
459464
# ipython
460465
mdurl==0.1.2
461466
# via markdown-it-py
467+
milvus-lite==2.4.10
468+
# via pymilvus
462469
minio==7.1.0
463470
# via feast (setup.py)
464471
mistune==3.0.2
@@ -556,6 +563,7 @@ pandas==2.2.3
556563
# google-cloud-bigquery
557564
# great-expectations
558565
# ibis-framework
566+
# pymilvus
559567
# snowflake-connector-python
560568
pandocfilters==1.5.1
561569
# via nbconvert
@@ -622,6 +630,7 @@ protobuf==4.25.5
622630
# grpcio-tools
623631
# mypy-protobuf
624632
# proto-plus
633+
# pymilvus
625634
# substrait
626635
psutil==5.9.0
627636
# via
@@ -666,7 +675,7 @@ pybindgen==0.22.1
666675
# via feast (setup.py)
667676
pycparser==2.22
668677
# via cffi
669-
pydantic==2.10.1
678+
pydantic==2.10.2
670679
# via
671680
# feast (setup.py)
672681
# fastapi
@@ -687,6 +696,8 @@ pyjwt[crypto]==2.10.0
687696
# msal
688697
# singlestoredb
689698
# snowflake-connector-python
699+
pymilvus==2.4.9
700+
# via feast (setup.py)
690701
pymssql==2.3.2
691702
# via feast (setup.py)
692703
pymysql==1.1.1
@@ -746,7 +757,9 @@ python-dateutil==2.9.0.post0
746757
# pandas
747758
# trino
748759
python-dotenv==1.0.1
749-
# via uvicorn
760+
# via
761+
# environs
762+
# uvicorn
750763
python-json-logger==2.0.7
751764
# via jupyter-events
752765
python-keycloak==4.2.2
@@ -847,6 +860,7 @@ setuptools==75.6.0
847860
# jupyterlab
848861
# kubernetes
849862
# pip-tools
863+
# pymilvus
850864
# singlestoredb
851865
singlestoredb==1.7.2
852866
# via feast (setup.py)
@@ -947,6 +961,7 @@ tqdm==4.67.1
947961
# via
948962
# feast (setup.py)
949963
# great-expectations
964+
# milvus-lite
950965
traitlets==5.14.3
951966
# via
952967
# comm
@@ -1028,6 +1043,8 @@ tzlocal==5.2
10281043
# via
10291044
# great-expectations
10301045
# trino
1046+
ujson==5.10.0
1047+
# via pymilvus
10311048
uri-template==1.3.0
10321049
# via jsonschema
10331050
urllib3==1.26.20

sdk/python/requirements/py3.9-requirements.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ pyarrow==18.0.0
9797
# via
9898
# feast (setup.py)
9999
# dask-expr
100-
pydantic==2.10.1
100+
pydantic==2.10.2
101101
# via
102102
# feast (setup.py)
103103
# fastapi
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
from typing import Any, Dict
2+
3+
from testcontainers.milvus import MilvusContainer
4+
5+
from tests.integration.feature_repos.universal.online_store_creator import (
6+
OnlineStoreCreator,
7+
)
8+
9+
10+
class MilvusOnlineStoreCreator(OnlineStoreCreator):
11+
def __init__(self, project_name: str, **kwargs):
12+
super().__init__(project_name)
13+
self.fixed_port = 19530
14+
self.container = MilvusContainer("milvusdb/milvus:v2.4.4").with_exposed_ports(
15+
self.fixed_port
16+
)
17+
18+
def create_online_store(self) -> Dict[str, Any]:
19+
self.container.start()
20+
# Wait for Milvus server to be ready
21+
host = "localhost"
22+
port = self.container.get_exposed_port(self.fixed_port)
23+
return {
24+
"type": "milvus",
25+
"host": host,
26+
"port": int(port),
27+
"index_type": "IVF_FLAT",
28+
"metric_type": "L2",
29+
"embedding_dim": 2,
30+
"vector_enabled": True,
31+
"nlist": 1,
32+
}
33+
34+
def teardown(self):
35+
self.container.stop()

0 commit comments

Comments
 (0)