Title: Calling get_historical_features for a feature service with an on_demand_feature_view expects the code locally · Issue #5620 · feast-dev/feast · GitHub
Open Graph Title: Calling get_historical_features for a feature service with an on_demand_feature_view expects the code locally · Issue #5620 · feast-dev/feast
X Title: Calling get_historical_features for a feature service with an on_demand_feature_view expects the code locally · Issue #5620 · feast-dev/feast
Description: Expected Behavior Feature retrieval should not depend on local code. This also causes issues deleting/updating the feature store via the CLI. Current Behavior If I register a feature service that uses an on_demand_feature_view and try to...
Open Graph Description: Expected Behavior Feature retrieval should not depend on local code. This also causes issues deleting/updating the feature store via the CLI. Current Behavior If I register a feature service that u...
X Description: Expected Behavior Feature retrieval should not depend on local code. This also causes issues deleting/updating the feature store via the CLI. Current Behavior If I register a feature service that u...
Opengraph URL: https://github.com/feast-dev/feast/issues/5620
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Calling get_historical_features for a feature service with an on_demand_feature_view expects the code locally","articleBody":"## Expected Behavior \n\nFeature retrieval should not depend on local code. This also causes issues deleting/updating the feature store via the CLI.\n\n## Current Behavior\n\nIf I register a feature service that uses an `on_demand_feature_view` and try to get historical features from it I get the following error:\n\n```\nTraceback (most recent call last):\n File \"/Users/user/Git/repo/test.py\", line 14, in \u003cmodule>\n features = feature_store.get_historical_features(\n File \"/Users/user/.pyenv/versions/repo/lib/python3.10/site-packages/feast/feature_store.py\", line 1171, in get_historical_features\n ) = utils._get_feature_views_to_use(self._registry, self.project, features)\n File \"/Users/user/.pyenv/versions/repo/lib/python3.10/site-packages/feast/utils.py\", line 1075, in _get_feature_views_to_use\n fv = registry.get_any_feature_view(name, project, allow_cache)\n File \"/Users/user/.pyenv/versions/repo/lib/python3.10/site-packages/feast/infra/registry/registry.py\", line 641, in get_any_feature_view\n return proto_registry_utils.get_any_feature_view(registry_proto, name, project)\n File \"/Users/user/.pyenv/versions/repo/lib/python3.10/site-packages/feast/infra/registry/proto_registry_utils.py\", line 92, in wrapper\n value = func(registry_proto, name, project)\n File \"/Users/user/.pyenv/versions/repo/lib/python3.10/site-packages/feast/infra/registry/proto_registry_utils.py\", line 145, in get_any_feature_view\n return OnDemandFeatureView.from_proto(on_demand_feature_view)\n File \"/Users/user/.pyenv/versions/repo/lib/python3.10/site-packages/feast/on_demand_feature_view.py\", line 393, in from_proto\n transformation = PandasTransformation.from_proto(\n File \"/Users/user/.pyenv/versions/repo/lib/python3.10/site-packages/feast/transformation/pandas_transformation.py\", line 150, in from_proto\n udf=dill.loads(user_defined_function_proto.body),\n File \"/Users/user/.pyenv/versions/repo/lib/python3.10/site-packages/dill/_dill.py\", line 311, in loads\n return load(file, ignore, **kwds)\n File \"/Users/user/.pyenv/versions/repo/lib/python3.10/site-packages/dill/_dill.py\", line 297, in load\n return Unpickler(file, ignore=ignore, **kwds).load()\n File \"/Users/user/.pyenv/versions/repo/lib/python3.10/site-packages/dill/_dill.py\", line 452, in load\n obj = StockUnpickler.load(self)\n File \"/Users/user/.pyenv/versions/repo/lib/python3.10/site-packages/dill/_dill.py\", line 442, in find_class\n return StockUnpickler.find_class(self, module, name)\nModuleNotFoundError: No module named 'feature_services'\n```\n\nI don't get this error if I'm running it from a location that it can find this module, but of course we want to deploy this feature service to the feature store and call it from elsewhere.\n\n## Steps to reproduce\n\nI am using a Redshift Offline Source.\n\nfeature service code:\n\n```python\nmerchandisability_feature_store = FeatureService(\n name=\"merchandisability\",\n features=[\n artwork_inquiries_feature_view,\n artwork_metadata_feature_view,\n artist_metadata_feature_view,\n partner_metadata_feature_view,\n purchase_metadata_feature_view,\n artwork_age, \u003c-- on demand feature view\n ],\n)\n```\n\nand I try to get features like so:\n\n```python\ndf = pd.DataFrame.from_dict(\n {\"user_id\": [\"user1\"], \"event_timestamp\": datetime.now()}\n)\nfeature_service = feature_store.get_feature_service(\"merchandisability\")\nfeatures = feature_store.get_historical_features(\n features=feature_service,\n entity_df=df,\n)\n```\n\n### Specifications\n\n- Version: 0.53.0\n- Platform: MacOS 15.4.1\n- Subsystem:\n\n## Possible Solution\n\n🤷 ","author":{"url":"https://github.com/amonkhouse","@type":"Person","name":"amonkhouse"},"datePublished":"2025-09-17T11:15:54Z","url":"https://github.com/feast-dev/feast/issues/5620"}
| 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 | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:35716a56-a3ae-7ffd-ce7b-3fde88a1d756 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C660:202219:236F96:30C54E:6AFE952D |
| html-safe-nonce | 369e14bdd72f650ad6e97fe39c3548cdd26a438b50113bad971d6f6f6033be76 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDNjYwOjIwMjIxOToyMzZGOTY6MzBDNTRFOjZBRkU5NTJEIiwidmlzaXRvcl9pZCI6IjcyMjE3ODU2MjA3ODYzNTM0NTMiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | a7198561ee0eaa8f3ff990d96cee6c5cb1ecd7762aaa09dafa15609e82e9c063 |
| hovercard-subject-tag | issue:3425839987 |
| github-keyboard-shortcuts | repository,issues,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/_view_fragments/issues/show/feast-dev/feast/5620/issue_layout |
| twitter:image | https://opengraph.githubassets.com/aa7ba8b186156a9fac3f61559b7fc451163da4d877105fcd51956ab23fd848ae/feast-dev/feast/issues/5620 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/aa7ba8b186156a9fac3f61559b7fc451163da4d877105fcd51956ab23fd848ae/feast-dev/feast/issues/5620 |
| og:image:alt | Expected Behavior Feature retrieval should not depend on local code. This also causes issues deleting/updating the feature store via the CLI. Current Behavior If I register a feature service that u... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | amonkhouse |
| hostname | github.com |
| expected-hostname | github.com |
| None | b3c0f155eafc27e60db6e254d1ffff0e072e9ab3b4018a5ee518797c19d89f86 |
| turbo-cache-control | no-preview |
| 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 |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 4a10310af51a1bfffbedc4fd81cb582acf0cb0ff |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width