12. Manage Feature Life Cycle
This tutorial guides you on how to adjust features when data changes occur. We’ll cover two types of changes:
- Data Distribution Changes: These require new cleaning operations.
- Data Availability Changes: These necessitate updates to the feature job settings.
If your catalog has an Approval Flow enabled, all such changes must be approved. This process ensures that:
- New feature versions are created to adapt to the data changes.
- Lists connected to the updated tables are refreshed.
Once approved, you can set up new deployments and deactivate outdated ones if necessary.
Step 0: Enable Approval Flow¶
Ensure the Approval Flow is enabled for your catalog.
-
Check for a validation mark next to the catalog name.
-
If absent, click the settings icon .
-
Open catalog settings and enable the Approval Flow option.
Step 1: Approve Features in a Feature List¶
Follow the prior tutorial to approve features in the feature list 47 features: In-Store Customer Activity Prediction
as production-ready.
-
Click next to mark all features in the feature list as "Production-Ready".
-
Select all features, then request, approve, and merge them in batches.
-
Confirm the feature list readiness reaches 100%.
Step 2: Update Cleaning Operations¶
This step demonstrates updating cleaning operations for the TotalCost
column in the INVOICEITEMS
table:
- Ignore disguised missing values:
-99
and-98
. - Cap amounts: Below
0 Euros
or above2000 Euros
.
Instructions¶
-
Access the Table Catalog: Navigate to the Explore section and select the Table Catalog and select the Table
INVOICEITEMS
. -
In the 'Columns' tab, click the button for
TotalCost
next to "No cleaning steps applied". -
Apply Cleaning Steps: Add the specified cleaning operations. Click "Apply 3 Cleaning Steps".
Approving Changes¶
-
Approval Request: Our prior change created an approval request. Click to review it.
-
Review Request: The request appears with other open requests under 'Change in Table Metadata'.
-
Check Table Summary: Select the request and go to the 'Table' tab to see a summary of changes, including the impact on features using TotalCost.
-
Affected Feature Lists: Visit 'Affected Feature Lists' tab to see which feature lists are impacted. Merging the request will create new versions to incorporate the newest default versions of the features in these feature lists.
-
Adjust Feature Actions: Go to 'Actions For Affected Features' tab to modify actions for affected features. By default, after merging, old versions are deprecated (or deleted) in favor of new versions to align with the new cleaning operations of
TotalCost
column. -
Deviate from Default Operations: Change action for a specific feature, like
CUSTOMER_Entropy_of_items_TotalCosts_by_product_ProductGroup_1w
to deviate from default cleaning operations. -
Analysis for Deviation: If there's a failed check due to lack of impact analysis, go to 'Actions For Affected Features' tab and provide an observation table and run the analysis.
-
For the analysis, provide an observation table. Click
-
Run the impact analysis for
CUSTOMER_Entropy_of_items_TotalCosts_by_product_ProductGroup_1w
by clicking . -
Review Analysis for Deviation: The analysis reveals that altering the cleaning operations does not result in any significant change in the feature values. This suggests that the new cleaning operations might not be essential for this particular feature. Completing the analysis changes the status checks to green, regardless of the outcome. The key is to ensure that you are informed about the implications of both the original and the updated cleaning operations.
-
Request Review: Once the request is ready for review, request by clicking .
-
Approve the request by clicking .
-
Merge the request by clicking .
-
View Merged Requests: Merged requests can be viewed under the 'Merged' tab in the request catalog.
Post-Merge Actions¶
Following the merge, address any new requests that arose as a result of the merging process.
Within the 'Approve' section's overview, at least one new request has emerged for Deviation from Cleaning Defaults.
You may have other requests "New Production-Ready Feature". We will see later how to deal with them.
Review Deviation from Default:
- Click on the request type.
- In the request, go to the 'Deviations From Default' tab to view more information. Provide an observation table as required and run the necessary impact analysis to assess the effects of the deviation by clicking .
- Finalize Request: Once the analysis is complete, proceed to request review, approve, and merge the request.
Review Upgrade of Feature Version
-
Click 'New Production-Ready Feature' in Overview
-
Verify Request Source: In the request, go to the 'Request Source' tab to confirm that the request is associated with the recent changes in table metadata.
-
Complete Request Process: Proceed to request review, then approve and finally merge the requests in batches.
Check Feature List Versions¶
In the Feature List Catalog, verify the creation of new default versions for affected feature lists.
Check Impact on Deployments¶
In the Deployment Catalog, check if the current deployment uses deprecated feature versions and plan for new deployments with updated versions if needed. In our example, the deployed feature list was not affected.
Step 3: Update Feature Job Settings¶
-
Navigate to the Table Catalog.
-
Run Data Availability Analysis: Select
GROCERYINVOICE
table, go to the 'About' tab, and scroll down to the bottom. Run new Analysis clicking and set the Minimum Feature Job Period to 1 hour -
Review Recommendations: The recommendations for the feature job settings of features using this table remain unchanged.
-
Download Report: You have the option to download the analysis report.
-
Update Feature Job Setting: Despite the recommendations, opt for a more conservative approach by adjusting the default feature job setting to a 5-minute blind spot.
-
Initiate Approval Request: This update triggers an approval request. Click to examine the request.
-
Resolve Check Failures: In the 'Checks' tab, identify why checks are failing. To pass the failed check, run a backtest to evaluate potential training-serving inconsistencies with the new setting by clickling .
-
Backtest Success: After a successful backtest, the checks will turn green.
-
Assess Affected Features: Examine the number of features impacted by this change.
-
Option to Close Request: If the new conservative setting seems to impact too many features, you may choose to close the request by clicking .
-
View Closed Requests: Closed requests can be viewed under the 'Closed' tab in the request catalog.
Step 4: Monitor Deployments¶
Access Scheduled Tasks: From the menu, under 'Manage', go to 'Tasks' and select the 'Scheduled' tab to view the completion status of tiles jobs.
Review Feature Job Status: Regularly check feature job status reports to monitor the performance of your deployed features.
Use the provided Python code snippet in a notebook to generate a detailed report on recent activities of scheduled feature jobs for a deployment.
import featurebyte as fb
# Set your profile to the tutorial environment
fb.use_profile("tutorial")
# Activate catalog
catalog = fb.Catalog.activate("Grocery Dataset UI Tutorial")
# Get deployment object
deployment = catalog.get_deployment("Simple set for Customer Activity next Week @ store")
# Get feature job status
deployment.get_feature_jobs_status()
Step 5: Disable Deployments¶
Navigate to Deployment Catalog: Access the Deployment Catalog from the 'Manage' section in the menu.
Disable Deployment: If a deployment is no longer needed, click the three dots next to its 'ENABLED' status and select 'Disable'.