Live data from Hacker News

Empowering data scientists with a feature store

yiksanchan.com

11–20 of 20 posts

Re: Empowering data scientists with a feature store

#11
post #8

I'm struggling to understand what the feature store is. Is it another name for an OLAP or BI cube? Ie. a huge precomputed group by query with rollups. The only new thing I see is that it combines both historical and recent data. Kinda like an olap cube with lambda architecture.

A feature store is just a set of features stored somewhere or with the instructions how to compute them. The benefit is that you can easily add new computed features to the store by telling it how it is computed, and then that new feature just works like any other feature. This lets you create a lot of reusable features and signals just by adding the code without touching the data. So you can do code review, add documentation to them and spread the knowledge hose these signals works throughout the organization.

I'm not sure how this relates to OLAP cubes since I am not aware of that term.

Re: Empowering data scientists with a feature store

#12

Earlier quoted context omitted.

> What I find missing in the internet is that people who have been doing this for years are not writing about this. In my last job I implemented a feature store from scratch with ca. 500 hand crafted and ca 2.500 with code generator automatically generated features. It didn't only serve the current value of the features, but the data scientists could populate an 'init' table manually with (customer_id, reference_date…

Hi NumberCruncher, thank you for your reply! > do they have a feature store with built in time-travel functionality? My feature store hasn't supported time-travel yet. But many SaaS implementations do, including Tecton, Hopswork, Splice Machine, etc. Open source feature stores haven't implemented this critical feature AFAIK. > Why I didn't write about it? Because it was implemented in PL/SQL running on Oracle ExaData…

Almost all features (maybe with the exception of gender) were aggregations over time like "share of emails the customer opened in the last X days", or "did the customer use service Y in the past: y/n", etc. If you use a pseudo SQL code like:

CREATE OR REPLACE target_table AS

SELECT

i.customer_id

... some aggregation processing data from t ...

FROM init_table i

LEFT JOIN transactional_data t

WHERE i.... = t....

AND t.time_stamp BETWEEN i.reference_date - (X days) AND i.reference_date

GROUP BY i.customer_id

than depending on what you put into the init_table, you can obtain:

- in the prod environment: actual feature value(s) for one ore more customers (reference_date = current_date)

- in the model-dev environment: historic feature value(s) for one or more customers for one or more past dates (reference_date = [past_date1, past_date2, ...])

In different parts of the system (prod, model-dev) you can use the same SQL code, you only have to replace the init_table and the target_table. Implementing a new feature system-wide basically means putting a new aggregation into the SQL code, only once.

I used PL/SQL as glue code, like someone would use python. I.e. executing SQL code in a controlled manner, creating dynamic SQL the right way (out of the box Oracle solution) and the wrong way too (sticking SQL fragments as strings together), writing code-generators, managing indexes/partitions/views/materialized views/etc. for performance tuning, implementing centralized monitoring for bug and performance tracking (and to know how the projects of my colleges are going forward), and last but not least, for packaging. At the end of the day you have a library/modul (PL/SQL package) exposing functions (PL/SQL procedures). The "library" is partially type-checked on compilation on the DB, and than you grant the necessary execute rights to the DB users (distribution to the data-scientists) and they work with the historic results on their own VM (DB schema). Current code is searchable in the DB, all the users use the same (actual) version, code history is checked in into bitbucket. If a user wants to "fork" and create new features, he/she can just write plain SQL against the prod DB on his/her own and the new code will be migrated through pair programming into the prod environment.

Sorry for the formatting.

Re: Empowering data scientists with a feature store

#13

Earlier quoted context omitted.

> What I find missing in the internet is that people who have been doing this for years are not writing about this. In my last job I implemented a feature store from scratch with ca. 500 hand crafted and ca 2.500 with code generator automatically generated features. It didn't only serve the current value of the features, but the data scientists could populate an 'init' table manually with (customer_id, reference_date…

Hi NumberCruncher, thank you for your reply! > do they have a feature store with built in time-travel functionality? My feature store hasn't supported time-travel yet. But many SaaS implementations do, including Tecton, Hopswork, Splice Machine, etc. Open source feature stores haven't implemented this critical feature AFAIK. > Why I didn't write about it? Because it was implemented in PL/SQL running on Oracle ExaData…

> My feature store hasn't supported time-travel yet. But many SaaS implementations do, including Tecton, Hopswork, Splice Machine, et

Good to know, I wasn't aware of them. At the end of the day the make or buy decision is influenced by the cost factor. In our case the development costed ca. 50k€ (obviously no SV salary), we had a user base of 10 data-scientists (incl. myself) and someone in house who knows the ins and outs of the system and can implement new stuff. I have to admit I was sharing my office with our DB architect, it would be hard to put a price tag on his support. I don't know how the pricing of the SaaS solutions compares to this.

Re: Empowering data scientists with a feature store

#14
post #11
post #8

I'm struggling to understand what the feature store is. Is it another name for an OLAP or BI cube? Ie. a huge precomputed group by query with rollups. The only new thing I see is that it combines both historical and recent data. Kinda like an olap cube with lambda architecture.

A feature store is just a set of features stored somewhere or with the instructions how to compute them. The benefit is that you can easily add new computed features to the store by telling it how it is computed, and then that new feature just works like any other feature. This lets you create a lot of reusable features and signals just by adding the code without touching the data. So you can do code review, add docu…

SQL also enables stored computation of columns through views. How does a feature store differ from a view? Or is it just a different name for basically the same thing?

Re: Empowering data scientists with a feature store

#17

Interesting, thanks for sharing. How do you handle historical backfill for new features? As in, some feature that can be updated in streaming fashion but whose initial value depends on data from the last X years, e.g., total # of courses completed since sign-up. Also, who is responsible for keeping the Flink jobs running: the data scientists, or do you have a separate streaming platform team?

Thanks for your kind words!

> How do you handle historical backfill for new features?

Currently, our feature store doesn't come with inbuilt feature backfilling. In order to do that, some manual work needs to be done. We're working on a brand new version of feature store that hopefully addresses this need.

> Who is responsible for keeping the Flink jobs running: the data scientists, or do you have a separate streaming platform team?

We have a separate data infra team who is responsible for managing the YARN cluster for us.

Re: Empowering data scientists with a feature store

#18
post #8

I'm struggling to understand what the feature store is. Is it another name for an OLAP or BI cube? Ie. a huge precomputed group by query with rollups. The only new thing I see is that it combines both historical and recent data. Kinda like an olap cube with lambda architecture.

I suggest checking out the link from @willempienaar. He is indeed the domain expert since he is building the open source feature store https://feast.dev/ :)

Re: Empowering data scientists with a feature store

#19

Earlier quoted context omitted.

Hi NumberCruncher, thank you for your reply! > do they have a feature store with built in time-travel functionality? My feature store hasn't supported time-travel yet. But many SaaS implementations do, including Tecton, Hopswork, Splice Machine, etc. Open source feature stores haven't implemented this critical feature AFAIK. > Why I didn't write about it? Because it was implemented in PL/SQL running on Oracle ExaData…

Hopsworks supports time-travel since version 2.4 and it is open-source.

Sorry I miss that

Re: Empowering data scientists with a feature store

#20

Earlier quoted context omitted.

Hi NumberCruncher, thank you for your reply! > do they have a feature store with built in time-travel functionality? My feature store hasn't supported time-travel yet. But many SaaS implementations do, including Tecton, Hopswork, Splice Machine, etc. Open source feature stores haven't implemented this critical feature AFAIK. > Why I didn't write about it? Because it was implemented in PL/SQL running on Oracle ExaData…

Almost all features (maybe with the exception of gender) were aggregations over time like "share of emails the customer opened in the last X days", or "did the customer use service Y in the past: y/n", etc. If you use a pseudo SQL code like: CREATE OR REPLACE target_table AS SELECT i.customer_id ... some aggregation processing data from t ... FROM init_table i LEFT JOIN transactional_data t WHERE i.... = t.... AND t.…

Thanks for sharing!

This SQL-intensive actually reminds me of the feature store solution by Splice Machine (https://splicemachine.com/press-releases/splice-machine-laun...). They implement a HTAP database and use that in a similar as you use PL/SQL. I had a writeup on this as well (https://yiksanchan.com/posts/splice-machine-feature-store)

Post reply on HN