Build a two-stage product recommender end to end: leakage-safe time windows, a PyTorch two-tower retriever with logQ correction, a FAISS HNSW index tuned against exact search, a LightGBM LambdaRank ranker, paired-bootstrap evaluation, a hash-verified ONNX bundle with a promotion gate and rollback, and a FastAPI service with fallbacks, shadow scoring and drift checks.
Machine Learning Engineer. Advanced.
For engineers who write Python, use NumPy and pandas and have trained a model, and want to build the retrieval, ranking, evaluation and safe-release system around it.
This project asks you to build something most tutorials skip: the system around a recommendation model. You will train models, but most of the work is deciding what data a model may see, measuring whether it is better than a simple rule, packaging it so the serving code cannot load the wrong thing, and noticing when live traffic stops looking like the data you evaluated on.
Brindle Market wants its "Recommended for you" carousel to show products a particular shopper is likely to want, instead of last month's best-sellers. That sounds like one model. In practice it is a small system with three jobs that pull in different directions:
A recommender is judged by one question: does it predict what a shopper will do next? Every choice in this lesson, from the synthetic data to the four time windows and the snapshots, exists to make the offline answer to that question honest. By the end you will be able to explain what leakage is, why a random train/test split leaks for recommenders, and how this project's snapshots make leakage impossible by construction.
The first stage of the recommender has a hard job: out of 6,000 products, pick about a hundred that this shopper might plausibly want, in a few milliseconds, for every page view. This lesson explains how a two-tower model makes that possible, how it is trained with in-batch negatives and logQ correction, and how this project makes training resumable and reproducible.
Once every product has a vector, retrieval is a search problem: given the shopper's vector, find the 100 product vectors with the highest dot product. This lesson explains how FAISS's HNSW index answers that quickly, what it gives up in exchange, and how the project measures and controls that loss instead of guessing.
Retrieval hands over about a hundred plausible products. Most shoppers will only look at the first few, so the order matters more than the set. This lesson explains learning to rank with LightGBM's LambdaRank, how its training data is built from a later time window, and why every ranking feature is computed by one shared function.
The product team's first question was whether a personalized system beats the current popularity rule. "The NDCG went up" is not an answer. This lesson explains the ranking metrics, the baselines the models must beat, how bootstrap intervals and paired comparisons express uncertainty, and why results are split into segments.
After a few experiments, the hardest question is often "which settings produced that number?". This lesson explains what experiment tracking records, how this project connects several pipeline stages to one MLflow run, and what MLflow is deliberately not used for.
A trained run lives in a folder of checkpoints, indexes and reports. None of it is ready to serve: the API has no PyTorch, files can change after evaluation, and nothing yet ties the served files to their evidence. This lesson explains the export stage: converting the user tower to ONNX and proving the conversion is faithful, and packaging a bundle whose ID covers every byte.
A model registry answers three questions: which models exist, which one is serving, and how did it get there? This lesson explains the project's small file registry, the promotion gate that decides whether a challenger may replace the champion, and why rollback is a pointer swap rather than a rebuild.
The storefront calls the recommendation API on every product page. It needs an answer quickly, every time, and it needs to know what kind of answer it got. This lesson explains how the FastAPI service loads and verifies the champion bundle, what happens to a request from validation to response, and how the fallback and the latency budget keep pages answered.
A recommender can fail without returning a single error: latency creeps up, the fallback quietly answers half the traffic, or shoppers start behaving differently from the data the model was evaluated on. This lesson covers the signals the API exposes, how to read them under load, how the population stability index detects drift, and how shadow scoring tries a challenger on real requests without risk.
You start with the source folder and Docker. By the end of this step you have the two images the lab uses (one for the offline pipeline, one for the API) and a running MLflow server for recording experiments. Nothing has been generated or trained yet.
Starting from built images and a running MLflow server, you create Brindle Market's synthetic event log, check it against the data contract and cut it into time windows with a point-in-time snapshot at each cutoff. These snapshots are the only way later stages see the data, so this step decides what every model is allowed to know.
With the snapshots in place, you train the two-tower retrieval model. You stop it deliberately after the first epoch and resume it, to see that checkpoints make an interrupted run continue rather than start over. MLflow records the loss and validation recall of every epoch.
The trained item tower embeds all 6,000 products, FAISS builds an HNSW index over them, and a sweep measures how many of the exact nearest neighbours each efSearch setting finds. Then retrieval proposes candidates for every ranker-window customer and LightGBM learns to order them from what those customers did next.
This is the step that answers the product team's first question: is the personalized system better than the current popularity rule, by how much, for which customers, and how certain is that? The evaluation runs all four strategies on the untouched test window and records per-customer results with bootstrap intervals and segments.
An evaluated run is not yet something the API can serve. Export converts the user tower to ONNX and checks it, measures the request path in-process, records a reference traffic profile and hashes every file into a manifest. Registration stores a verified copy as challenger, and promotion applies the gate before making it champion.
The API container starts, verifies the champion bundle and loads it, and only then reports ready. You send requests for a known customer, an anonymous session and an unknown visitor, and force a degraded response by shrinking the latency budget, so you see every strategy the API can return.
With the API ready, you send generated traffic, read the latency summary and the Prometheus metrics, and run the drift report. Then you send traffic shaped like the start of the garden season and run the drift report again to watch it change, and interpret what the alert does and does not mean.
A recommender is never finished; this step practises the release loop. You retrain without the logQ correction on the same dataset, register the result as challenger, shadow it on live requests, and let the promotion gate decide. Finally you practise a rollback and return the registry to the original champion.
Cleanup removes everything this project created: its containers, network, volumes (datasets, runs, registry, logs and MLflow data) and images. It works from any state, including a build that stopped part-way, and leaves other Docker resources on your machine alone.
Learning Access: INR 199 plus 18% GST. Source Pack: INR 399 plus 18% GST. 90 days of online access. No auto-renewal.
Everything runs locally in Docker; no cloud account, GPU or paid service is used. Expect about 1-2 GB of downloads for images and packages, a few GB of disk while the lab exists, and some CPU time for training. The optional CI workflow uses GitHub Actions minutes on your own repository. This is a learning reference, not a hosted lab or a production-readiness guarantee.
Vectametric Project Source Licence (2026-09-27): lawfully obtained source may be copied, modified and deployed for personal learning and interview preparation, including personal portfolio demonstrations with attribution. These permissions continue after online access expires. Do not resell or redistribute the Source Pack or its original source files, unchanged or modified. Commercial or client production use requires separate written permission. Third-party packages installed from the lock files, such as PyTorch, FAISS, LightGBM, ONNX Runtime, MLflow and FastAPI, retain their own licences. See LICENSE.txt and the Project Source Licence section of the site Terms for the full rules.
You can read the project material without deploying it. Running a cloud build requires the accounts, permissions and tools listed in that project's prerequisites. Deployment runs in your environment, not in a hosted Vectametric lab.
Yes. Learning Access includes the online source-file browser and explanations. The Source Pack adds the downloadable reference repository where available. The project's licence governs use of the source.
No. Cloud and CI usage are separate. Read the project's cost notice, set a budget and stop deadline, and follow its destruction and leftover-resource checks.
The project curriculum lists the available scenarios and interview topics. These focus on understanding the architecture and explaining decisions; they are not a promise of particular interview questions or a job.
The project page and checkout show the online access period for your selected plan. Access does not auto-renew. Downloaded source remains subject to its licence; future releases are not automatically included.
Review the Terms and No-Refund Policy before confirming access. All sales are final; Vectametric does not offer refunds.
Vectametric home · Roadmaps · Vecta IT Exams · Vecta Government Exams · Vecta Banking & Finance Exams · Vecta Entrance Exams · About us · Contact · Privacy Policy · Terms and Conditions · No-Refund Policy