PRIYANKA VERGADIA: Did you know that most
of the time spent by data scientists
goes into wrangling data?
More specifically, in feature engineering,
which is transforming raw data into high-quality input
signals for ML models.
But this process is often inefficient and brittle.
Well I'm Priyanka, and in this video
we will identify the key challenges
with feature engineering, how Vertex Feature Store help solve
them, and see a quick demo.
Now what are the key challenges with ML features?
The first is that they are hard to share and reuse
across your different steps of the ML workflow
and across projects, which results in duplicate efforts.
Second is that it is hard to serve in production reliably
with lower latency, and the third
is that there is an inadvertent skew in feature
values between training and serving,
usually, which causes your model quality to degrade over time.
That is exactly where Vertex Feature Store comes in.
It's a fully managed and unified solution
to share, discover, and serve machine
learning features at scale across different teams
within your organization.
And it also helps reduce the time
to build and deploy your AI ML applications
by making it easy to manage and organize
your ML features in one place.
It makes the features reusable, easy to serve, and avoids skew.
Now let's see how to set it up.
In the console, in Vertex AI, we see the Feature tab.
To get started, let's click on this documentation
and explore, using Feature Store section.
Now the first thing you need is a Feature Store.
At the time of this recording, Feature Store
is in preview so just know that depending
on when you're watching this, there might be more options
and updates that you would see.
You cannot create a Feature Store in the console,
so let's use this sample notebook to learn how to create
it using the SDK.
This sample uses a movie recommendations data
set and the task is to train a model
to predict if a user is going to watch a movie
and serve this model online.
We will learn to import our features into Feature Store,
serve online prediction requests using the imported features,
and then access imported features in offline jobs,
such as training jobs.
To set up, we install some additional packages,
set up our project, and authenticate our Google Cloud
account.
Step one is to create data set for output.
We are creating BigQuery data set to host the output data.
Input the name of the data set and the table
we want to store the output later.
Then we are defining constants and
Feature Store-related imports.
Here's how the Vertex Feature Store actually works.
It organizes the data with the three hierarchical concepts.
Featurestore, which is the place to store your features--
EntityType, under Featurestore, describes an object
to be modeled, real or virtual, and Feature itself,
under EntityType, describes an attribute of that EntityType.
Now in our movie's prediction example,
we will create a featurestore called movie_prediction.
This store has two entity types--
Users and Movies.
The user's entity type has age, gender,
and like genres features.
The Movies entity type has the genre and average rating
features.
The first thing we do is to create the featurestore.
The method to create a featurestore
returns a long running operation that
starts an asynchronous job.
This may take about three minutes or so,
and once the featurestore is created,
we can see it in the console.
And we can create our entities in this store.
I'm creating two entities here--
user and movies.
We can also create features within these entities.
Here I've created age, gender, and like genres
under user, and title, genres, and average rating
under our movies.
If we want, we can search through
and filter on these features.
Now we need to import feature values before we can use them
for online offline serving.
Let's head back into our notebook
to see how to import features in bulk using the Python SDK.
We define the data source, the BigQuery table or Cloud Storage
bucket, and the destination featurestore, entity
and the features to be imported.
You do this for both users and the movies entities.
Now for a latency-sensitive service such as online model
prediction, we would need to serve our feature values
online.
For example, for a movie service,
we might want to quickly show movies
that the current user would most likely watch
by using online predictions.
You can read one entity per request
or even read multiple entities per request.
Now if you need feature values for high throughput,
typically for training a model or batch prediction,
then serving feature values in batch
is a better idea than serving online.
Consider this example-- if the task is to prepare a training
data set to train a model which predicts if a given user will
watch a given movie, then to achieve this we need two sets
of inputs--
features, that we have already imported,
and labels, which is the ground-truth data recorder
that user X has watched movie Y. It also
includes the time stamp which indicates when the ground-truth
was actually observed.
As labels and feature values are collected over time,
those feature values change.
The Feature Store can perform a point in time lookup
so that you can fetch the feature
values at a particular time.
It's literally the data version of going back
to a previous version of your source code in GitHub.
Imagine freezing the state of the feature
values at two different timestamps.
And that was a quick summary of Vertex Feature Store.
Just know that at the time of this recording,
the Feature Store is in preview, so chances there
are more options and features available when
you're watching this video.
To explore more up-to-date information,
check out the documentation that I've linked below.
Any questions, let me know in the comments
or on Twitter @pvergadia.