Google Cloud
This quickstart will walk through creating a few simple features, labels, and a training set using BigQuery and Firestore. We will use a transaction fraud training set.
Requirements
-
An available domain/subdomain you own that can be pointed at your cluster IP
Step 1: Clone the Featureform Repo
Step 2: Create GCP Services
We’ll start BigQuery, Firestore, and Google Kubernetes Engine (GKE). (Specific services can be enabled/disabled as needed in terraform.auto.tfvars)
We need to set:
Set our CLI to our current project
Step 3: Configure Kubectl
We need to load the GKE config into our kubeconfig.
Step 4: Install Featureform
We’ll use Terraform to install Featureform on our GKE cluster.
Step 5: Direct Your Domain To Featureform
Featureform automatically provisions a public certificate for your domain name.
To connect, you need to point your domain name at the Featureform GKE Cluster.
We can get the IP Address for the cluster using:
You need to add 2 records to your DNS provider for the (sub)domain you intend to use:
-
A CAA record for letsencrypt.org value:
0 issuewild "letsencrypt.org"
. This allows letsencrypt to automatically generate a public certificate -
An A record with the value of the outputted value from above
Step 6: Load Demo Data
We can load some demo data into BigQuery that we can transform and serve.
Step 7: Install the Featureform SDK
Step 8: Register providers
GCP Registered providers require a GCP Credentials file for a user that has permissions for Firestore and BigQuery.
Once we create our config file, we can apply it to our Featureform deployment.
Step 9: Define our resources
We will create a user profile for us, and set it as the default owner for all the following resource definitions.
Now we’ll register our user fraud dataset in Featureform.
Next, we’ll define a SQL transformation on our dataset.
Next, we’ll register a passenger entity to associate with a feature and label.
Finally, we’ll join together the feature and label into a training set.
Now that our definitions are complete, we can apply it to our Featureform instance.
Step 10: Serve features for training and inference
Once we have our training set and features registered, we can train our model.
Example Output:
We can serve features in production once we deploy our trained model as well.
Example Output: