Title: fix: Serve aliased on demand feature views in feature services by breken-ai · Pull Request #6901 · feast-dev/feast · GitHub
Open Graph Title: fix: Serve aliased on demand feature views in feature services by breken-ai · Pull Request #6901 · feast-dev/feast
X Title: fix: Serve aliased on demand feature views in feature services by breken-ai · Pull Request #6901 · feast-dev/feast
Description: What this PR does / why we need it: If an on demand feature view is added to a FeatureService under an alias, its features are silently missing from online responses. service = FeatureService( name="driver_service", features=[driver_stats_fv, scaled.with_name("scaled_alias")], ) store.get_online_features(entity_rows=[{"driver_id": 1001}], features=service) # -> {"driver_id": [...], "conv_rate": [...]} # conv_rate_x10 from the aliased ODFV is missing, no error raised The feature service's refs use the projection name, so they read scaled_alias:conv_rate_x10. _group_feature_refs and _get_feature_views_to_use resolve that ref through projection.name_to_use(). _augment_response_with_on_demand_transforms is different: it keys requested_odfv_map by odfv.name, which is scaled. The aliased ref never matches, the transform is skipped, and the requested feature is dropped from the response. Pandas and python modes are both affected. with_name is the public aliasing API for ODFVs (#1872), and the same function already builds full names from projection.name_to_use(), so aliases are meant to work here. The fix keys the map by projection.name_alias when one is set and falls back to odfv.name. Versioned refs are unchanged, because _parse_feature_ref strips @vN before the lookup. Which issue(s) this PR fixes: No existing issue. I searched open issues and PRs for ODFV aliases and with_name in feature services and didn't find a match. Checks I've made sure the tests are passing. My commits are signed off (git commit -s) My PR title follows conventional commits format Testing Strategy Unit tests Integration tests Manual tests Testing is not required for this change New test_feature_service_serves_aliased_odfv_features[pandas|python] in tests/unit/test_on_demand_pandas_transformation.py. It serves a feature service that holds odfv.with_name(...) and checks the default names in both modes and the full names (scaled_alias__conv_rate_x10) in pandas mode. On master (3667772) both cases fail with KeyError: 'conv_rate_x10'. With this change both pass. The ODFV, feature service, online response, versioning and feature store unit files (17 files) give 232 passed. The same 5 tests fail with and without the change: three TestOnDemandTransformationsWithWrites tests hit the UDF globals NameError tracked in #6815, and two tensor tests need torch. ruff check, ruff format --check and mypy feast/utils.py are clean. Misc This PR only fixes online serving. get_historical_features with the same aliased feature service fails loudly with Could not find feature view from reference scaled_alias:conv_rate_x10, because offline stores re-fetch ODFVs from the registry by name. That is part of the ODFV handling cleanup in #5890. The python mode full-name case is fixed separately in #6900. This change was prepared with an AI coding assistant, and the tests and checks above were run locally.
Open Graph Description: What this PR does / why we need it: If an on demand feature view is added to a FeatureService under an alias, its features are silently missing from online responses. service = FeatureService( ...
X Description: What this PR does / why we need it: If an on demand feature view is added to a FeatureService under an alias, its features are silently missing from online responses. service = FeatureService( ...
Opengraph URL: https://github.com/feast-dev/feast/pull/6901
X: @github
Domain: github.com
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:b1d4f099-dbc5-deee-d729-d9ef0eefc1dc |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | D5D0:2A16C9:130524F:193E14F:6AFEAD9A |
| html-safe-nonce | ebb483f66baace7b62e825e34e8dba0ebe7fbf74d19881ac7037fd3c02172ff6 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJENUQwOjJBMTZDOToxMzA1MjRGOjE5M0UxNEY6NkFGRUFEOUEiLCJ2aXNpdG9yX2lkIjoiMjI4OTc1MjIwMzc5NzExNDI2NiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 9815867d01edcfec5f2f7117c07c72bd4eb899be12864a67b10cf646d13b07fa |
| hovercard-subject-tag | pull_request:4685062570 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/feast-dev/feast/pull/6901/files |
| twitter:image | https://avatars.githubusercontent.com/u/312387581?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/312387581?s=400&v=4 |
| og:image:alt | What this PR does / why we need it: If an on demand feature view is added to a FeatureService under an alias, its features are silently missing from online responses. service = FeatureService( ... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 95b2753c978240785d6cca00783c00a371b2d7d9879bb32e305170a1b19bd28e |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/feast-dev/feast git https://github.com/feast-dev/feast.git |
| octolytics-dimension-user_id | 57027613 |
| octolytics-dimension-user_login | feast-dev |
| octolytics-dimension-repository_id | 161133770 |
| octolytics-dimension-repository_nwo | feast-dev/feast |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 161133770 |
| octolytics-dimension-repository_network_root_nwo | feast-dev/feast |
| turbo-body-classes | logged-out env-production page-responsive full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 3f25273206cd841171bca0002261ae4c9757d934 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width