GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix: Entityless fv breaks with `KeyError: __dummy` applying feature_s… · ExpediaGroup/feast@ef4ef32

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • sdk/python/feast
    • inference.py
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎sdk/python/feast/inference.py‎

Copy file name to clipboardExpand all lines: sdk/python/feast/inference.py
+10-4Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import re
2-
from typing import List, Set, Union
2+
from typing import List, Optional, Set, Union
33

44
from feast.data_source import DataSource, PushSource, RequestSource
55
from feast.entity import Entity
@@ -119,7 +119,10 @@ def update_feature_views_with_inferred_features_and_entities(
119119

120120
for fv in fvs:
121121
join_keys = set(
122-
[entity_name_to_join_key_map[entity_name] for entity_name in fv.entities]
122+
[
123+
entity_name_to_join_key_map.get(entity_name)
124+
for entity_name in fv.entities
125+
]
123126
)
124127

125128
# Fields whose names match a join key are considered to be entity columns; all
@@ -137,7 +140,10 @@ def update_feature_views_with_inferred_features_and_entities(
137140

138141
# Respect the `value_type` attribute of the entity, if it is specified.
139142
for entity_name in fv.entities:
140-
entity = entity_name_to_entity_map[entity_name]
143+
entity = entity_name_to_entity_map.get(entity_name)
144+
# pass when entity does not exist. Entityless feature view case
145+
if entity is None:
146+
continue
141147
if (
142148
entity.join_key
143149
not in [entity_column.name for entity_column in fv.entity_columns]
@@ -181,7 +187,7 @@ def update_feature_views_with_inferred_features_and_entities(
181187

182188
def _infer_features_and_entities(
183189
fv: FeatureView,
184-
join_keys: Set[str],
190+
join_keys: Set[Optional[str]],
185191
run_inference_for_features,
186192
config,
187193
) -> None:

0 commit comments

Comments
0 (0)
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.