Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
e38a7c0
feat: Adding Docling RAG demo
franciscojavierarceo Mar 1, 2025
f9c7db4
updated demo
franciscojavierarceo Mar 2, 2025
4ba9fce
cleaned up notebook
franciscojavierarceo Mar 2, 2025
6c3ea35
adding chunk id
franciscojavierarceo Mar 2, 2025
410ded0
adding quickstart demo that is WIP and updating docling-demo to expor…
franciscojavierarceo Mar 2, 2025
8f0c663
adding current tentative exmaple repo
franciscojavierarceo Mar 2, 2025
f098674
adding current temporary work
franciscojavierarceo Mar 2, 2025
99dc5f3
updating to handle missed edge case
franciscojavierarceo Mar 3, 2025
29ca46f
linter
franciscojavierarceo Mar 3, 2025
3f23d25
updating demo script to rename things
franciscojavierarceo Mar 3, 2025
d366988
updated quickstart
franciscojavierarceo Mar 3, 2025
f917183
added comment
franciscojavierarceo Mar 3, 2025
e8b9e4a
checking in progress
franciscojavierarceo Mar 6, 2025
521abb5
updating with progress...found large bug
franciscojavierarceo Mar 6, 2025
731d6f1
almost have something working...very close
franciscojavierarceo Mar 7, 2025
f0d396d
have writes behaving, now need reads
franciscojavierarceo Mar 7, 2025
86b09c5
fixed writes and reads and unit test
franciscojavierarceo Mar 7, 2025
cbcbe70
got write test working (not explode though)
franciscojavierarceo Mar 7, 2025
48fba5f
checking in progress for now, still have some issues with vector retr…
franciscojavierarceo Mar 7, 2025
fef8666
okay think i have most things working
franciscojavierarceo Mar 8, 2025
8626762
unit tests are passing...still need to lint but checking in for tonight
franciscojavierarceo Mar 8, 2025
3cd0093
fixed unit test and linter...i believe
franciscojavierarceo Mar 9, 2025
ffac095
removing commenting and unnecessary code
franciscojavierarceo Mar 9, 2025
2e9d2d5
forgot to add file for unit tests
franciscojavierarceo Mar 9, 2025
94c60d6
skipping test for some
franciscojavierarceo Mar 9, 2025
fabd394
removing rag docling demo from this branch
franciscojavierarceo Mar 9, 2025
e545e4b
addding skip test back in for milvus
franciscojavierarceo Mar 9, 2025
548e0ce
removed print statement
franciscojavierarceo Mar 9, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fixed writes and reads and unit test
Signed-off-by: Francisco Javier Arceo <farceo@redhat.com>
  • Loading branch information
franciscojavierarceo committed Mar 7, 2025
commit 86b09c5a97177a2dd33be7a3825b6c3a6b75519b
12 changes: 7 additions & 5 deletions sdk/python/feast/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -469,11 +469,13 @@ def _group_feature_refs(
view_index = {view.projection.name_to_use(): view for view in all_feature_views}

# on demand view to on demand view proto
on_demand_view_index = {
view.projection.name_to_use(): view
for view in all_on_demand_feature_views
if view.projection
}
on_demand_view_index: Dict[str, "OnDemandFeatureView"] = {}
for view in all_on_demand_feature_views:
if view.projection and not view.write_to_online_store:
on_demand_view_index[view.projection.name_to_use()] = view
elif view.projection and view.write_to_online_store:
# we insert the ODFV view to FVs for ones that are written to the online store
view_index[view.projection.name_to_use()] = view

# view name to feature names
views_features = defaultdict(set)
Expand Down
20 changes: 12 additions & 8 deletions sdk/python/tests/unit/test_on_demand_python_transformation.py
Original file line number Diff line number Diff line change
Expand Up @@ -860,6 +860,9 @@ def test_stored_writes(self):
assert driver_stats_fv.entities == [driver.name]
assert driver_stats_fv.entity_columns == []

ODFV_STRING_CONSTANT = "guaranteed constant"
ODFV_OTHER_STRING_CONSTANT = "somethign else"

@on_demand_feature_view(
entities=[driver],
sources=[
Expand Down Expand Up @@ -889,7 +892,7 @@ def python_stored_writes_feature_view(
"current_datetime": [datetime.now() for _ in inputs["conv_rate"]],
"counter": [c + 1 for c in inputs["counter"]],
"input_datetime": [d for d in inputs["input_datetime"]],
"string_constant": ["guaranteed constant"],
"string_constant": [ODFV_STRING_CONSTANT],
}
return output

Expand Down Expand Up @@ -980,7 +983,7 @@ def python_stored_writes_feature_view(
"conv_rate": 0.25,
"acc_rate": 0.50,
"input_datetime": current_datetime,
"string_constant": "something else",
"string_constant": ODFV_OTHER_STRING_CONSTANT,
}
]
odfv_entity_rows_to_read = [
Expand All @@ -991,7 +994,7 @@ def python_stored_writes_feature_view(
"acc_rate": 0.50,
"counter": 0,
"input_datetime": current_datetime,
"string_constant": "guaranteed constant",
"string_constant": ODFV_STRING_CONSTANT,
}
]
print("storing ODFV features")
Expand Down Expand Up @@ -1045,12 +1048,13 @@ def python_stored_writes_feature_view(
"string_constant",
]
)
# This should be 1 because we write the value and then we should not increment it
# query sqlite here to confirm value:
# self.store.config.online_store._conn.
assert online_odfv_python_response["counter"] == [0]
# This should be 1 because we write the value of 0 and during the write, the counter is incremented
assert online_odfv_python_response["counter"] == [1]
assert online_odfv_python_response["string_constant"] == [
"gauranteed constant"
ODFV_STRING_CONSTANT
]
assert online_odfv_python_response["string_constant"] != [
ODFV_OTHER_STRING_CONSTANT
]

def test_stored_writes_with_explode(self):
Expand Down