René's URL Explorer Experiment


Title: get_historical_features fails with dask error for file offline store · Issue #2865 · feast-dev/feast · GitHub

Open Graph Title: get_historical_features fails with dask error for file offline store · Issue #2865 · feast-dev/feast

X Title: get_historical_features fails with dask error for file offline store · Issue #2865 · feast-dev/feast

Description: Expected Behavior feature_store.get_historical_features(df, features=fs_columns).to_df() where feature_store is a feature store with file offline store and fs_columns is a list of column names, and df is a Pandas data frame, should work....

Open Graph Description: Expected Behavior feature_store.get_historical_features(df, features=fs_columns).to_df() where feature_store is a feature store with file offline store and fs_columns is a list of column names, and...

X Description: Expected Behavior feature_store.get_historical_features(df, features=fs_columns).to_df() where feature_store is a feature store with file offline store and fs_columns is a list of column names, and...

Opengraph URL: https://github.com/feast-dev/feast/issues/2865

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"get_historical_features fails with dask error for file offline store","articleBody":"## Expected Behavior \r\n\r\n```\r\nfeature_store.get_historical_features(df, features=fs_columns).to_df()\r\n```\r\n\r\nwhere `feature_store` is a feature store with file offline store and `fs_columns` is a list of column names, and `df` is a Pandas data frame, should work.\r\n\r\n## Current Behavior\r\n\r\nIt currently raises an error inside of dask:\r\n\r\n```\r\nE           NotImplementedError: dd.DataFrame.apply only supports axis=1\r\nE             Try: df.apply(func, axis=1)\r\n```\r\n\r\nStacktrace:\r\n\r\n```\r\n../../.cache/pypoetry/virtualenvs/w3-search-letor-SCEBvDm1-py3.9/lib/python3.9/site-packages/feast/infra/offline_stores/offline_store.py:81: in to_df\r\n    features_df = self._to_df_internal()\r\n../../.cache/pypoetry/virtualenvs/w3-search-letor-SCEBvDm1-py3.9/lib/python3.9/site-packages/feast/usage.py:280: in wrapper\r\n    raise exc.with_traceback(traceback)\r\n../../.cache/pypoetry/virtualenvs/w3-search-letor-SCEBvDm1-py3.9/lib/python3.9/site-packages/feast/usage.py:269: in wrapper\r\n    return func(*args, **kwargs)\r\n../../.cache/pypoetry/virtualenvs/w3-search-letor-SCEBvDm1-py3.9/lib/python3.9/site-packages/feast/infra/offline_stores/file.py:75: in _to_df_internal\r\n    df = self.evaluation_function().compute()\r\n../../.cache/pypoetry/virtualenvs/w3-search-letor-SCEBvDm1-py3.9/lib/python3.9/site-packages/feast/infra/offline_stores/file.py:231: in evaluate_historical_retrieval\r\n    df_to_join = _normalize_timestamp(\r\n../../.cache/pypoetry/virtualenvs/w3-search-letor-SCEBvDm1-py3.9/lib/python3.9/site-packages/feast/infra/offline_stores/file.py:530: in _normalize_timestamp\r\n    df_to_join[timestamp_field] = df_to_join[timestamp_field].apply(\r\n```\r\n\r\n## Steps to reproduce\r\n\r\nHere is my feature store definition:\r\n\r\n```python\r\nfrom feast import FeatureStore, RepoConfig, FileSource, FeatureView, ValueType, Entity, Feature\r\nfrom feast.infra.offline_stores.file import FileOfflineStoreConfig\r\nfrom google.protobuf.duration_pb2 import Duration\r\n\r\nsource_path = tmp_path / \"source.parquet\"\r\ntimestamp = datetime.datetime(year=2022, month=4, day=29, tzinfo=datetime.timezone.utc)\r\ndf = pd.DataFrame(\r\n    {\r\n        \"entity\": [0, 1, 2, 3, 4],\r\n        \"f1\": [1.0, 1.1, 1.2, 1.3, 1.4],\r\n        \"f2\": [\"a\", \"b\", \"c\", \"d\", \"e\"],\r\n        \"timestamp\": [\r\n            timestamp,\r\n            # this one should not be fetched as it is too far into the past\r\n            timestamp - datetime.timedelta(days=2),\r\n            timestamp,\r\n            timestamp,\r\n            timestamp,\r\n        ],\r\n    }\r\n)\r\ndf.to_parquet(source_path)\r\nsource = FileSource(\r\n    path=str(source_path),\r\n    event_timestamp_column=\"timestamp\",\r\n    created_timestamp_column=\"timestamp\",\r\n)\r\nentity = Entity(\r\n    name=\"entity\",\r\n    value_type=ValueType.INT64,\r\n    description=\"Entity\",\r\n)\r\n\r\nview = FeatureView(\r\n    name=\"view\",\r\n    entities=[\"entity\"],\r\n    ttl=Duration(seconds=86400 * 1),\r\n    features=[\r\n        Feature(name=\"f1\", dtype=ValueType.FLOAT),\r\n        Feature(name=\"f2\", dtype=ValueType.STRING),\r\n    ],\r\n    online=True,\r\n    batch_source=source,\r\n    tags={},\r\n)\r\n\r\nconfig = RepoConfig(\r\n    registry=str(tmp_path / \"registry.db\"),\r\n    project=\"hello\",\r\n    provider=\"local\",\r\n    offline_store=FileOfflineStoreConfig(),\r\n)\r\n\r\nstore = FeatureStore(config=config)\r\nstore.apply([entity, view])\r\n\r\nexpected = pd.DataFrame(\r\n    {\r\n        \"event_timestamp\": timestamp,\r\n        \"entity\": [0, 1, 2, 3, 5],\r\n        \"someval\": [0.0, 0.1, 0.2, 0.3, 0.5],\r\n        \"f1\": [1.0, np.nan, 1.2, 1.3, np.nan],\r\n        \"f2\": [\"a\", np.nan, \"c\", \"d\", np.nan],\r\n    }\r\n)\r\n```\r\n\r\n### Specifications\r\n\r\n- Version: 0.21.3\r\n- Platform: Linux\r\n- Subsystem: Python 3.9\r\n\r\n## Possible Solution\r\n\r\nThis works fine in at least version 0.18.1, but I think it fails for any \u003e0.20\r\n\r\nIt might have something to do with adding Dask requirement, maybe the version is insufficient? I used to use 2022.2 before, but the requirement is now for 2022.1.1. But this is just a guess, really.","author":{"url":"https://github.com/elshize","@type":"Person","name":"elshize"},"datePublished":"2022-06-27T20:31:54.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":6},"url":"https://github.com/2865/feast/issues/2865"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:8b03e502-2d8a-66be-7df8-6db5f7600385
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idD1C4:1F61EE:18B3AAB:2322405:697A4B6E
html-safe-noncec6f49826b677c103ff9fadee5d133a6388c0087ad97a7fd8ca542f371c9d5e33
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEMUM0OjFGNjFFRToxOEIzQUFCOjIzMjI0MDU6Njk3QTRCNkUiLCJ2aXNpdG9yX2lkIjoiODQ0MTM3OTM0NTgxMjU3MzAzOCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac3bb0b3299562a90c23a25c639c616b645a7bf713e98f5977aded376d6262af92
hovercard-subject-tagissue:1286322456
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/feast-dev/feast/2865/issue_layout
twitter:imagehttps://opengraph.githubassets.com/c9ea4e1d375d8b6c919f118c46d9f0ef3f9e606345ffe83b92974402150ebca5/feast-dev/feast/issues/2865
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/c9ea4e1d375d8b6c919f118c46d9f0ef3f9e606345ffe83b92974402150ebca5/feast-dev/feast/issues/2865
og:image:altExpected Behavior feature_store.get_historical_features(df, features=fs_columns).to_df() where feature_store is a feature store with file offline store and fs_columns is a list of column names, and...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameelshize
hostnamegithub.com
expected-hostnamegithub.com
None553d32486a978372da5772d723ffbf66cac04403ab1794b7225c035f1d23252c
turbo-cache-controlno-preview
go-importgithub.com/feast-dev/feast git https://github.com/feast-dev/feast.git
octolytics-dimension-user_id57027613
octolytics-dimension-user_loginfeast-dev
octolytics-dimension-repository_id161133770
octolytics-dimension-repository_nwofeast-dev/feast
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id161133770
octolytics-dimension-repository_network_root_nwofeast-dev/feast
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release8d7fdc30d680a0be278b8d9916215e64c987f09a
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/feast-dev/feast/issues/2865#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Ffeast-dev%2Ffeast%2Fissues%2F2865
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub SparkBuild and deploy intelligent appshttps://github.com/features/spark
GitHub ModelsManage and compare promptshttps://github.com/features/models
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Ffeast-dev%2Ffeast%2Fissues%2F2865
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=feast-dev%2Ffeast
Reloadhttps://github.com/feast-dev/feast/issues/2865
Reloadhttps://github.com/feast-dev/feast/issues/2865
Reloadhttps://github.com/feast-dev/feast/issues/2865
feast-dev https://github.com/feast-dev
feasthttps://github.com/feast-dev/feast
Notifications https://github.com/login?return_to=%2Ffeast-dev%2Ffeast
Fork 1.2k https://github.com/login?return_to=%2Ffeast-dev%2Ffeast
Star 6.7k https://github.com/login?return_to=%2Ffeast-dev%2Ffeast
Code https://github.com/feast-dev/feast
Issues 181 https://github.com/feast-dev/feast/issues
Pull requests 68 https://github.com/feast-dev/feast/pulls
Discussions https://github.com/feast-dev/feast/discussions
Actions https://github.com/feast-dev/feast/actions
Security 0 https://github.com/feast-dev/feast/security
Insights https://github.com/feast-dev/feast/pulse
Code https://github.com/feast-dev/feast
Issues https://github.com/feast-dev/feast/issues
Pull requests https://github.com/feast-dev/feast/pulls
Discussions https://github.com/feast-dev/feast/discussions
Actions https://github.com/feast-dev/feast/actions
Security https://github.com/feast-dev/feast/security
Insights https://github.com/feast-dev/feast/pulse
New issuehttps://github.com/login?return_to=https://github.com/feast-dev/feast/issues/2865
New issuehttps://github.com/login?return_to=https://github.com/feast-dev/feast/issues/2865
#2965https://github.com/feast-dev/feast/pull/2965
get_historical_features fails with dask error for file offline storehttps://github.com/feast-dev/feast/issues/2865#top
#2965https://github.com/feast-dev/feast/pull/2965
kind/bughttps://github.com/feast-dev/feast/issues?q=state%3Aopen%20label%3A%22kind%2Fbug%22
priority/p2https://github.com/feast-dev/feast/issues?q=state%3Aopen%20label%3A%22priority%2Fp2%22
https://github.com/elshize
https://github.com/elshize
elshizehttps://github.com/elshize
on Jun 27, 2022https://github.com/feast-dev/feast/issues/2865#issue-1286322456
kind/bughttps://github.com/feast-dev/feast/issues?q=state%3Aopen%20label%3A%22kind%2Fbug%22
priority/p2https://github.com/feast-dev/feast/issues?q=state%3Aopen%20label%3A%22priority%2Fp2%22
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.