FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

feat: Allow CRUD on entities, data sources, and feature views from UI by rohit-bharmal · Pull Request #6412 · feast-dev/feast · GitHub

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .js  (1) .py  (3) .ts  (7) .tsx  (15) All 4 file types selected
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
This file contains hidden or 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
Expand Up @@ -32,6 +32,7 @@
class FeatureModel(BaseModel):
name: str
value_type: int = 2
description: Optional[str] = ""


class ApplyFeatureViewRequestBody(BaseModel):
Expand Down Expand Up @@ -307,7 +308,13 @@ def list_all_feature_views(
def apply_feature_view(body: ApplyFeatureViewRequestBody):
feature_specs = []
for f in body.features or []:
feature_specs.append(FeatureSpecV2(name=f.name, value_type=f.value_type))
feature_specs.append(
FeatureSpecV2(
name=f.name,
value_type=f.value_type,
description=f.description or "",
)
)

batch_source_proto = (
DataSourceProto(name=body.batch_source) if body.batch_source else None
Expand Down
17 changes: 14 additions & 3 deletions sdk/python/tests/unit/api/test_api_rest_registry.py
This file contains hidden or 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
Expand Up @@ -2091,8 +2091,16 @@ def test_apply_and_delete_feature_view_via_rest(fastapi_test_app):
"project": "demo_project",
"entities": ["user_id"],
"features": [
{"name": "trip_count", "value_type": 2},
{"name": "avg_rating", "value_type": 4},
{
"name": "trip_count",
"value_type": 2,
"description": "Number of completed trips",
},
{
"name": "avg_rating",
"value_type": 4,
"description": "Average driver rating",
},
],
"ttl_seconds": 86400,
"online": True,
Expand All @@ -2107,7 +2115,10 @@ def test_apply_and_delete_feature_view_via_rest(fastapi_test_app):
# Verify it exists
response = fastapi_test_app.get("/feature_views/driver_stats?project=demo_project")
assert response.status_code == 200
assert response.json()["spec"]["name"] == "driver_stats"
spec = response.json()["spec"]
assert spec["name"] == "driver_stats"
assert spec["features"][0]["description"] == "Number of completed trips"
assert spec["features"][1]["description"] == "Average driver rating"

# Delete it
response = fastapi_test_app.delete(
Expand Down
4 changes: 3 additions & 1 deletion sdk/python/tests/utils/rag_test_utils.py
This file contains hidden or 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
Expand Up @@ -92,7 +92,9 @@ def run_side_effect(cmd, *args, **kwargs):
with runner.local_repo(
get_example_repo("example_feature_repo_1.py"),
offline_store="file",
online_store="milvus",
# The vector store tests below use MockVectorStore and only need the
# feature view registered; avoid Milvus Lite index setup flakiness.
online_store="sqlite",
apply=False,
teardown=True,
) as store:
Expand Down
Loading
Loading

Back | FazBrowse Home | New Git URL