Repository navigation
Open
7 / 137 of 13 issues completedLabels
Community Contribution NeededWe want community to contributegood first issueGood for newcomerskeep-openkind/featureNew feature or requestkind/projectA top level project to be tracked in GitHub Projectspriority/p1
Description
Is your feature request related to a problem? Please describe.
The current Feast get_historical_features() method requires that users provide an entity dataframe as follows
training_df = store.get_historical_features(
entity_df=entity_df,
feature_refs = [
'drivers_activity:trips_today'
'drivers_profile:rating'
],
)However, many users would like the feature store to provide entities to them for training, instead of having to query or provide entities as part of the entity dataframe.
Describe the solution you'd like
Allow users to specify an existing feature view from which an entity dataframe will be queried.
training_df = store.get_historical_features(
entity_df="drivers_activity",
feature_refs = [
'drivers_activity:trips_today'
'drivers_profile:rating'
],
)With the addition of time range filtering.
training_df = store.get_historical_features(
entity_df="drivers_activity",
feature_refs = [
'drivers_activity:trips_today'
'drivers_profile:rating'
],
from_date=(today - timedelta(days = 7)),
to_date=datetime.now(),
)Reacted by Sumin Byeon, Vitaly Sergeyev, André Oliveira da Silva, Lara, Juha Hellén, roshanrosareo, Guy Khazma, Sriharsha Alapati, hisham-kottayil, devos-enjins-tier and 19 more
Reacted by Felix Neko, André Oliveira da Silva, Lara, Juha Hellén, Sriharsha Alapati, hisham-kottayil, tkch3n, Patrick Hohenecker, Melissa Kok, Prabodh Agarwal and 5 more
Sub-issues
Collapse Sub-issuesSub-issues
Loading 13 sub-issues
Metadata
Metadata
Assignees
Labels
Community Contribution NeededWe want community to contributegood first issueGood for newcomerskeep-openkind/featureNew feature or requestkind/projectA top level project to be tracked in GitHub Projectspriority/p1
Type
Projects
- StatusShow more project fieldsTodo
Activity
tedhtchang commentedon Jun 7, 2021
Does this mean the resulting
training_dfcontain every row (but only selectdriver_id, event_timestamp, trips_today, and ratingcolumns), from thedrivers_activityview ?woop commentedon Jun 7, 2021
Actually my example was poor. I've modified it to show that we can query multiple feature views. Essentially how it works is that we will query the
entity_dffor all entities, but it can now be an existing feature view. We would only query it for timestamps and entity columns. Features then get joined onto those rows as usual.NoRaincheck commentedon Jul 2, 2021
Should there also be an option to "keep latest" only, when used in conjunction with the time range filtering
Otherwise its more than possible that the underlying entity dataframe could have duplicated entity keys.
The usecase for this in my mind is for backtesting purposes.
woop commentedon Jul 2, 2021
Do you mean entity row or entity key? https://docs.feast.dev/concepts/data-model-and-concepts#entity-row
So you would not want to return features with the same entity key over different dates?
NoRaincheck commentedon Jul 2, 2021
I was thinking entity key. Only as an option - there are use cases for enabling both of them.
For example, if our machine learning deployment is a daily batch job, perhaps for back-testing we would have the
get_historical_features(from_date=my_date-timedelta(days=1), to_date=my_date), wheremy_dateis the timestamp to simulate when our machine learning job "would run" on a daily basisThough this then raises a good question on how this kind of workflow should be productionised? E.g. if I have an hourly/daily batch which goes through our whole customer base to find fraudulent customers, how should this work in feast? We wouldn't really use the online store for this, and this API could look something like:
Probably a discussion for another thread...
NoRaincheck commentedon Jul 2, 2021
Can I give this a go and raise a PR for File based offlinestore only?
I'll stick the spec written(?), though I noticed elsewhere in the repo the nomenclature used was
start_dateandend_date- should we align to that rather thanfrom_dateandto_datehttps://github.com/feast-dev/feast/blob/master/sdk/python/feast/infra/offline_stores/file.py#L219-L220 ?woop commentedon Jul 5, 2021
I can see the value in this. In fact, some other folks have also asked for it. Would you mind creating a new issue and linking back to this issue for us? I think it's worth a separate discussion. Specifically, the need for a
latest onlyargument inget_historical_features().woop commentedon Jul 5, 2021
You can give it a go, but we probably won't release it until we have support for all our main stores. Perhaps a better middle ground is to add a new method to the FeatureStore class and have it throw a
NotImplementedexception for the other stores, and specifically print warnings that this functionality is experimental and will change.NoRaincheck commentedon Jul 5, 2021
Sounds good, hopefully I'll pull something together "soon". I'll name the method something sensible as well.
MattDelac commentedon Jul 15, 2021
Hi there 👋 ,
As I already explained to Willem, we built an higher level API on our side to make the life of our users easier
It basically does the following
Happy to have a chat about a similar API implemented in Feast
stale commentedon Nov 14, 2021
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
18 remaining items
franciscojavierarceo commentedon Jan 9, 2026
@jyejare this is great, can you make child issues for all of the other offline stores?