forked from feast-dev/feast
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: Updating tests to allow for the CLIRunner to use Milvus, also …
…have to handle special case of not running apply and teardown (feast-dev#4915) * chore: Updating tests to allow for the CLIRunner to use Milvus, also have to handle special case of not running apply and teardown Signed-off-by: Francisco Javier Arceo <farceo@redhat.com> * Adding cleanup Signed-off-by: Francisco Javier Arceo <farceo@redhat.com> * adding example repo Signed-off-by: Francisco Javier Arceo <farceo@redhat.com> * changing defualt to FLAT for local implementation Signed-off-by: Francisco Javier Arceo <farceo@redhat.com> --------- Signed-off-by: Francisco Javier Arceo <farceo@redhat.com>
- Loading branch information
1 parent
a8aeb79
commit e5527ad
Showing
4 changed files
with
293 additions
and
33 deletions.
There are no files selected for viewing
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
38 changes: 38 additions & 0 deletions
38
sdk/python/tests/example_repos/example_rag_feature_repo.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,38 @@ | ||
from datetime import timedelta | ||
|
||
from feast import Entity, FeatureView, Field, FileSource | ||
from feast.types import Array, Float32, Int64, UnixTimestamp | ||
|
||
# This is for Milvus | ||
# Note that file source paths are not validated, so there doesn't actually need to be any data | ||
# at the paths for these file sources. Since these paths are effectively fake, this example | ||
# feature repo should not be used for historical retrieval. | ||
|
||
rag_documents_source = FileSource( | ||
path="data/embedded_documents.parquet", | ||
timestamp_field="event_timestamp", | ||
created_timestamp_column="created_timestamp", | ||
) | ||
|
||
item = Entity( | ||
name="item_id", # The name is derived from this argument, not object name. | ||
join_keys=["item_id"], | ||
) | ||
|
||
document_embeddings = FeatureView( | ||
name="embedded_documents", | ||
entities=[item], | ||
schema=[ | ||
Field( | ||
name="vector", | ||
dtype=Array(Float32), | ||
vector_index=True, | ||
vector_search_metric="L2", | ||
), | ||
Field(name="item_id", dtype=Int64), | ||
Field(name="created_timestamp", dtype=UnixTimestamp), | ||
Field(name="event_timestamp", dtype=UnixTimestamp), | ||
], | ||
source=rag_documents_source, | ||
ttl=timedelta(hours=24), | ||
) |
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