feat(cli): Add recommendation template for feast init - #6078
Open
doc-johnson wants to merge 8 commits into
Open
Conversation
doc-johnson
force-pushed
the
feat/recommendation-template
branch
from
March 9, 2026 12:25
d9af218 to
df3427d
Compare
Add a new "recommendation" template demonstrating product recommendations using vector similarity search with pre-computed embeddings (all-MiniLM-L6-v2) and SQLite online store with vector_enabled. Signed-off-by: doc-johnson <hustler@mail.ru>
doc-johnson
force-pushed
the
feat/recommendation-template
branch
from
June 26, 2026 09:21
1fb6e6b to
7478002
Compare
Signed-off-by: doc-johnson <hustler@mail.ru>
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a new feast init template (recommendation) that scaffolds a small product-recommendation demo using vector similarity search backed by a local SQLite online store (with vector search enabled). This extends Feast’s CLI templates with a concrete end-to-end example for vector retrieval.
Changes:
- Adds a new
sdk/python/feast/templates/recommendation/template with bootstrap data generation (embeddings), feature definitions, local SQLite config, and an end-to-end demo script. - Registers the
recommendationtemplate in the CLI--templatechoices. - Adds a unit test to validate the presence of key template artifacts and vector-search-related configuration.
Reviewed changes
Copilot reviewed 6 out of 8 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| sdk/python/tests/unit/local_feast_tests/test_init.py | Adds assertions that the recommendation template exists and is configured for SQLite vector search. |
| sdk/python/feast/templates/recommendation/bootstrap.py | Bootstraps a small product catalog and writes precomputed embeddings to parquet; fills template placeholders. |
| sdk/python/feast/templates/recommendation/feature_repo/feature_definitions.py | Defines the entity/FeatureView with a vector-indexed embedding field and a FeatureService. |
| sdk/python/feast/templates/recommendation/feature_repo/feature_store.yaml | Configures a local SQLite online store with vector_enabled: true. |
| sdk/python/feast/templates/recommendation/feature_repo/test_workflow.py | End-to-end demo script: apply, materialize, vector similarity query via retrieve_online_documents_v2, teardown. |
| sdk/python/feast/templates/recommendation/init.py | Adds package marker for the new template directory. |
| sdk/python/feast/templates/recommendation/feature_repo/init.py | Adds package marker for the template feature repo. |
| sdk/python/feast/cli/cli.py | Adds recommendation to the accepted feast init --template values. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+31
to
+35
| features=[ | ||
| "product_embeddings:embedding", | ||
| "product_embeddings:product_name", | ||
| "product_embeddings:category", | ||
| "product_embeddings:price", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Covers point 3 from #5478, a recommendation-engine template for
feast init.The template is a small product-recommendation setup built around vector similarity search. It ships 12 sample products across four categories (Electronics, Books, Sports, Home), pre-computes their embeddings with
all-MiniLM-L6-v2(384 dims) at bootstrap time, and stores them in a SQLite online store with vector search enabled.test_workflow.pyruns the whole thing end to end: apply, materialize, a top-k similarity query throughretrieve_online_documents_v2, then teardown.What is in it:
bootstrap.pybuilds the product catalog and writes the embeddings out to parquetfeature_definitions.pydefines the entity, a FeatureView with avector_indexfield, and a FeatureServicefeature_store.yamlis a plain local SQLite config withvector_enabled: truetest_workflow.pyis the runnable democli.pyregistersrecommendationin thefeast inittemplate choicesWhat I checked locally:
feast init test_rec --template recommendationscaffolds a working projectfeast applyregisters the entity, view and service, and a second run reports no changespython test_workflow.pygoes through the full cycle without errorslocaltemplate still behaves the sameruff checkandruff formatare clean