| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
Making a prediction using a linear regression model is a common use case in ML. In this guide tutorial, we build the model that predicts if a driver will complete a trip based on a number of features ingested into Feast.
The basic local mode gives you ability to quickly try Feast, while the advanced mode shows how you can use Feast in a production setting, in particular for the Google Cloud Platform (GCP) cloud.
This tutorial uses Feast with Scikit Learn to
To successfully run this tutorial, it requires that you have an account on GCP and have access to read and write permissions to BigQuery. Also, you need to install Google Cloud CLI for your localhost platform.
pip install feast scikit-learn 'feast[gcp]'
(This tutorial has been tested with Feast==0.11.0)
cd driver_ranking/ feast apply cd ..
python train.py
cd driver_ranking/ feast materialize-incremental 2022-01-01T00:00:00 cd ..
python predict.py
Ensure that Google cloud has been configured
gcloud config set project SET_YOUR_GCP_PROJECT_HERE gcloud auth application-default login
Change the provider field in driver_ranking/feature_store.yaml from local to gcp
Then apply and materialize data to Firestore
cd driver_ranking/ feast apply feast materialize-incremental 2022-01-01T00:00:00 cd ..
python predict.py
For production use its preferred to use a Google Cloud Storage based registry instead of a local repository. This allows multiple production systems to share the same source of truth for feature definitions.
Change feature_store.yaml to
project: driver_ranking registry: gs://my-feature-store-bucket/registry.db provider: gcp
Change predict.py and train.py to
self.fs = feast.FeatureStore(
config=RepoConfig(
project="driver_ranking",
provider="gcp",
registry="gs://my-feature-store-bucket/registry.db",
)
)
| Back | FazBrowse Home | New Git URL |