{"id":28051456,"url":"https://github.com/decodingml/personalized-recommender-course","last_synced_at":"2025-05-12T01:02:22.490Z","repository":{"id":261645647,"uuid":"884750190","full_name":"decodingml/personalized-recommender-course","owner":"decodingml","description":"👕 Open-source course on architecting, building and deploying a real-time personalized recommender for H\u0026M fashion articles.","archived":false,"fork":false,"pushed_at":"2025-04-26T14:19:04.000Z","size":4523,"stargazers_count":391,"open_issues_count":0,"forks_count":82,"subscribers_count":7,"default_branch":"main","last_synced_at":"2025-04-26T15:26:54.488Z","etag":null,"topics":["course","feature-store","mlops","personalized-recommendation","python","recommender-system","tutorial","two-tower-neural-networks"],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/decodingml.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-11-07T10:19:47.000Z","updated_at":"2025-04-26T14:19:07.000Z","dependencies_parsed_at":"2024-12-12T18:19:36.605Z","dependency_job_id":"0611a8f5-485d-4512-a620-8d97a97a0b8f","html_url":"https://github.com/decodingml/personalized-recommender-course","commit_stats":null,"previous_names":["decodingml/hands-on-recommender-system","decodingml/hands-on-personalized-recommender","decodingml/personalized-recommender-course"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/decodingml%2Fpersonalized-recommender-course","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/decodingml%2Fpersonalized-recommender-course/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/decodingml%2Fpersonalized-recommender-course/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/decodingml%2Fpersonalized-recommender-course/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/decodingml","download_url":"https://codeload.github.com/decodingml/personalized-recommender-course/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253655955,"owners_count":21943081,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["course","feature-store","mlops","personalized-recommendation","python","recommender-system","tutorial","two-tower-neural-networks"],"created_at":"2025-05-12T01:02:01.545Z","updated_at":"2025-05-12T01:02:22.439Z","avatar_url":"https://github.com/decodingml.png","language":"Jupyter Notebook","readme":"\u003cdiv align=\"center\"\u003e\n  \u003ch1\u003eHands-on H\u0026M Real-Time Personalized Recommender\u003c/h1\u003e\n  \u003cp class=\"tagline\"\u003eOpen-source course by \u003ca href=\"https://decodingml.substack.com\"\u003eDecoding ML\u003c/a\u003e in collaboration with \u003ca href=\"https://rebrand.ly/homepage-github\"\u003eHopsworks\u003c/a\u003e.\u003c/p\u003e\n\u003c/div\u003e\n\n\u003c/br\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://decodingml.substack.com/p/33d3273e-b8e3-4d98-b160-c3d239343022\"\u003e\n    \u003cimg src=\"assets/system_architecture.png\" alt=\"Architecture\" width=\"600\"\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n## 🎯 What You'll Learn\n\nThis hands-on course teaches you how to build and deploy a real-time personalized recommender system for H\u0026M fashion articles. You'll learn:\n\n- To architect a modern ML system for real-time personalized recommenders.\n- To do feature engineering using modern tools such as Polars.\n- To design and train ML models for recommender systems powered by neural networks.\n- To use MLOps best practices by leveraging [Hopsworks AI Lakehouse](https://rebrand.ly/homepage-github).\n- To deploy the recommender on a Kubernetes cluster managed by [Hopsworks Serverless](https://rebrand.ly/serverless-github) using KServe.\n- To apply LLM techniques for personalized recommendations.\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"assets/4_stage_recommender_architecture.png\" alt=\"4_stage_recommender_architecture\" width=\"400\" style=\"display: inline-block; margin-right: 20px;\"\u003e\n  \u003cimg src=\"assets/two_tower_embedding_model.png\" alt=\"two_tower_embedding_model\" width=\"400\" style=\"display: inline-block;\"\u003e\n\u003c/p\u003e\n\n## 📖 About This Course\n\nThis course is part of Decoding ML's open-source series, where we provide free hands-on resources for building GenAI and recommender systems.\n\nThe **Hands-on H\u0026M Real-Time Personalized Recommender**, in collaboration with [Hopsworks](https://rebrand.ly/homepage-github), is a 5-module course backed up by code, Notebooks and lessons that will teach you how to build an H\u0026M real-time personalized recommender from scratch.\n\nBy the end of this course, you will know how to architect, build and deploy a modern recommender.\n\n**What you'll do:**\n\n1. Architect a scalable and modular ML system using the Feature/Training/Inference (FTI) architecture.\n3. Feature engineering on top of our H\u0026M data for collaborative and content-based filtering techniques for recommenders.\n2. Use the two-tower network to Create user and item embeddings in the same vector space.\n3. Implement an H\u0026M real-time personalized recommender using the 4-stage recommender design and a vector database.\n4. Use MLOps best practices, such as a feature store and a model registry.\n5. Deploy the online inference pipeline to Kubernetes using KServe.\n6. Deploy the offline ML pipelines to GitHub Actions.\n7. Implement a web interface using Streamlit.\n8. Improve the H\u0026M real-time personalized recommender using LLMs.\n\n🥷 With these skills, you'll become a ninja in building real-time personalized recommenders. \n\n## 🌐 Live Demo\n\nTry out our deployed H\u0026M real-time personalized recommender to see what you'll learn to build by the end of this course:\n[💻 Live H\u0026M Recommender Streamlit Demo](https://decodingml-hands-on-personalized-recommender.streamlit.app/)\n\n\u003e [!IMPORTANT]\n\u003e The demo is in 0-cost mode, which means that when there is no traffic, the deployment scales to 0 instances. The first time you interact with it, give it 1-2 minutes to warm up to 1+ instances. Afterward, everything will become smoother.\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://decodingml.substack.com/p/33d3273e-b8e3-4d98-b160-c3d239343022\"\u003e\n    \u003cimg src=\"assets/ui_example.png\" alt=\"UI Example\" width=\"800\"\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n----\n\n\u003ctable style=\"border-collapse: collapse; border: none;\"\u003e\n  \u003ctr style=\"border: none;\"\u003e\n    \u003ctd width=\"20%\" style=\"border: none;\"\u003e\n      \u003ca href=\"https://decodingml.substack.com/\" aria-label=\"Decoding ML\"\u003e\n        \u003cimg src=\"https://github.com/user-attachments/assets/f2f2f9c0-54b7-4ae3-bf8d-23a359c86982\" alt=\"Decoding ML Logo\" width=\"150\"/\u003e\n      \u003c/a\u003e\n    \u003c/td\u003e\n    \u003ctd width=\"80%\" style=\"border: none;\"\u003e\n      \u003cdiv\u003e\n        \u003ch2\u003e📬 Stay Updated\u003c/h2\u003e\n        \u003cp\u003e\u003cb\u003e\u003ca href=\"https://decodingml.substack.com/\"\u003eJoin Decoding ML\u003c/a\u003e\u003c/b\u003e for proven content on designing, coding, and deploying production-grade AI systems with software engineering and MLOps best practices to help you ship AI applications. Every week, straight to your inbox.\u003c/p\u003e\n      \u003c/div\u003e\n    \u003c/td\u003e\n  \u003c/tr\u003e\n\u003c/table\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://decodingml.substack.com/\"\u003e\n    \u003cimg src=\"https://img.shields.io/static/v1?label\u0026logo=substack\u0026message=Subscribe%20Now\u0026style=for-the-badge\u0026color=black\u0026scale=2\" alt=\"Subscribe Now\" height=\"40\"\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n## 👥 Who Should Join?\n\n**This course is ideal for:**\n- ML/AI engineers interested in building production-ready recommender systems\n- Data Engineers, Data Scientists, and Software Engineers wanting to understand the engineering behind recommenders\n\n**Note:** This course focuses on engineering practices and end-to-end system implementation rather than theoretical model optimization or research.\n\n## 🎓 Prerequisites\n\n| Category | Requirements |\n|----------|-------------|\n| **Skills** | Basic understanding of Python and Machine Learning |\n| **Hardware** | Any modern laptop/workstation will do the job (no GPU or powerful computing power required). We also support Google Colab or GitHub Actions for compute.|\n| **Level** | Intermediate |\n\n\n## 💰 Cost Structure\n\nAll tools used throughout the course will stick to their free tier, except OpenAI's API, as follows:\n\n- Modules 1-4: Completely free\n- Module 5 (Optional): ~$1-2 for OpenAI API usage when building LLM-enhanced recommenders\n\n## 🥂 Open-source Course: Participation is Open and Free\n\nAs an open-source course, you don't have to enroll. Everything is self-paced, free of charge and with its resources freely accessible as follows:\n- **code**: this GitHub repository\n- **articles**: [Decoding ML](https://decodingml.substack.com/p/the-ultimate-recommender-system-framework)\n\n## 📚 Course Outline\n\nThis **open-source course consists of 5 comprehensive modules** covering theory, system design, and hands-on implementation.\n\nOur recommendation for each module:\n1. Read the article\n2. Run the Notebook to replicate our results (locally or on Colab)\n3. Following the Notebook, go deeper into the code by reading the `recsys` Python module\n\n\u003e [!NOTE]\n\u003e Check the [INSTALL_AND_USAGE](https://github.com/decodingml/hands-on-personalized-recommender/blob/main/INSTALL_AND_USAGE.md) doc for a step-by-step installation and usage guide.\n\n| Module | Article | Description | Notebooks |\n|--------|-------|-------------|----------------|\n| 1 | [Building a TikTok-like recommender](https://decodingml.substack.com/p/33d3273e-b8e3-4d98-b160-c3d239343022) | Learn how to architect a recommender system using the 4-stage architecture and two-tower network. | **No code** |\n| 2 | [Feature pipelines for TikTok-like recommenders](https://decodingml.substack.com/p/feature-pipeline-for-tiktok-like) | Learn how to build a scalable feature pipeline using a feature store. | •[1_fp_computing_features.ipynb](notebooks/1_fp_computing_features.ipynb) |\n| 3 | [Training pipelines for TikTok-like recommenders](https://decodingml.substack.com/p/training-pipelines-for-tiktok-like) | Learn to train and evaluate the two-tower network and ranking model using MLOps best practices. | •[2_tp_training_retrieval_model.ipynb](notebooks/2_tp_training_retrieval_model.ipynb)\u003cbr\u003e•[3_tp_training_ranking_model.ipynb](notebooks/3_tp_training_ranking_model.ipynb) |\n| 4 | [Deploy scalable TikTok-like recommenders](https://decodingml.substack.com/p/deploy-scalable-tiktok-like-recommenders) | Learn how to architect and deploy the inference pipelines for real-time recommendations using the 4-stage design. | •[4_ip_computing_item_embeddings.ipynb](notebooks/4_ip_computing_item_embeddings.ipynb)\u003cbr\u003e•[5_ip_creating_deployments.ipynb](notebooks/5_ip_creating_deployments.ipynb)\u003cbr\u003e•[6_scheduling_materialization_jobs.ipynb](notebooks/6_scheduling_materialization_jobs.ipynb) |\n| 5 | [Using LLMs to build TikTok-like recommenders](https://decodingml.substack.com/p/using-llms-to-build-tiktok-like-recommenders) | Learn how to enhance the H\u0026M personalized recommender with LLMs. | •[7_ip_creating_deployments_llm_ranking.ipynb](notebooks/7_ip_creating_deployments_llm_ranking.ipynb) |\n\n### Google Colab\n\nTo run the Notebooks in Google Colab, copy-paste them into your Google Drive, open them with Google Colab, and run them as running them locally. At the beginning of each Notebook, we have a set of setup steps that will **prepare the code and Python environment automatically**.\n\n----\n\n\u003ctable style=\"border-collapse: collapse; border: none;\"\u003e\n  \u003ctr style=\"border: none;\"\u003e\n    \u003ctd width=\"20%\" style=\"border: none;\"\u003e\n      \u003ca href=\"https://decodingml.substack.com/\" aria-label=\"Decoding ML\"\u003e\n        \u003cimg src=\"https://github.com/user-attachments/assets/f2f2f9c0-54b7-4ae3-bf8d-23a359c86982\" alt=\"Decoding ML Logo\" width=\"150\"/\u003e\n      \u003c/a\u003e\n    \u003c/td\u003e\n    \u003ctd width=\"80%\" style=\"border: none;\"\u003e\n      \u003cdiv\u003e\n        \u003ch2\u003e📬 Stay Updated\u003c/h2\u003e\n        \u003cp\u003e\u003cb\u003e\u003ca href=\"https://decodingml.substack.com/\"\u003eJoin Decoding ML\u003c/a\u003e\u003c/b\u003e for proven content on designing, coding, and deploying production-grade AI systems with software engineering and MLOps best practices to help you ship AI applications. Every week, straight to your inbox.\u003c/p\u003e\n      \u003c/div\u003e\n    \u003c/td\u003e\n  \u003c/tr\u003e\n\u003c/table\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://decodingml.substack.com/\"\u003e\n    \u003cimg src=\"https://img.shields.io/static/v1?label\u0026logo=substack\u0026message=Subscribe%20Now\u0026style=for-the-badge\u0026color=black\u0026scale=2\" alt=\"Subscribe Now\" height=\"40\"\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n## 🏗️ Project Structure\n\nAt Decoding ML we teach how to build production ML systems, thus the course follows the structure of a real-world Python project:\n\n```bash\n.\n├── notebooks/          # Jupyter notebooks for each pipeline\n├── recsys/             # Core recommender system package\n│   ├── config.py       # Configuration and settings\n│   ...\n│   └── training/       # Training pipelines code\n├── tools/              # Utility scripts\n├── streamlit_app.py    # Streamlit app entry point\n├── .env.example        # Example environment variables template\n├── Makefile            # Commands to install and run the project\n├── pyproject.toml      # Project dependencies\n```\n\n## 👔 Dataset\n\nWe will use the [H\u0026M Personalized Fashion Recommendations](https://www.kaggle.com/competitions/h-and-m-personalized-fashion-recommendations) dataset, available on Kaggle, open-source for academic research and education.\n\nIt is an e-commerce dataset that contains fashion articles from the H\u0026M clothes brand.\n\nIt contains:\n- 105k articles\n- 137k customers\n- 31 million transactions \n\nMore on the dataset in the feature engineering pipeline [Notebook](notebooks/1_fp_computing_features.ipynb) and [article](https://decodingml.substack.com/p/feature-pipeline-for-tiktok-like).\n\n## 🚀 Getting Started\n\nFor detailed installation and usage instructions, see our [INSTALL_AND_USAGE](https://github.com/decodingml/hands-on-personalized-recommender/blob/main/INSTALL_AND_USAGE.md) guide.\n\n**Recommendation:** While you can follow the installation guide directly, we strongly recommend reading the accompanying articles to gain a complete understanding of the recommender system.\n\n## 💡 Questions and Troubleshooting\n\nHave questions or running into issues? We're here to help!\n\nOpen a [GitHub issue](https://github.com/decodingml/hands-on-personalized-recommender/issues) for:\n- Questions about the course material\n- Technical troubleshooting\n- Clarification on concepts\n\nWhen having issues with [Hopsworks Serverless](https://rebrand.ly/serverless-github), the best place to ask questions is on [Hopsworks's Slack](https://join.slack.com/t/public-hopsworks/shared_invite/zt-1uf21vitz-rhHKNdIf8GEiOf1EJ6Wzsw), where their engineers can help you directly.\n\n## 🥂 Contributing\n\nAs an open-source course, we may not be able to fix all the bugs that arise.\n\nIf you find any bugs and know how to fix them, support future readers by contributing to this course with your bug fix.\n\nWe will deeply appreciate your support for the AI community and future readers 🤗\n\n## Sponsors\n\n\u003ctable\u003e\n  \u003ctr\u003e\n    \u003ctd align=\"center\"\u003e\n      \u003ca href=\"https://rebrand.ly/homepage-github\" target=\"_blank\"\u003eHopsworks\u003c/a\u003e\n    \u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd align=\"center\"\u003e\n      \u003ca href=\"https://rebrand.ly/homepage-github\" target=\"_blank\"\u003e\n        \u003cimg src=\"assets/hopsworks.png\" width=\"200\" alt=\"Hopsworks\"\u003e\n      \u003c/a\u003e\n    \u003c/td\u003e\n  \u003c/tr\u003e\n\u003c/table\u003e\n\n## Contributors\n\n\u003ctable\u003e\n  \u003ctr\u003e\n    \u003ctd align=\"center\"\u003e\n      \u003ca href=\"https://github.com/iusztinpaul\"\u003e\n        \u003cimg src=\"https://github.com/iusztinpaul.png\" width=\"100px;\" alt=\"Paul Iusztin\"/\u003e\u003cbr /\u003e\n        \u003csub\u003e\u003cb\u003ePaul Iusztin\u003c/b\u003e\u003c/sub\u003e\n      \u003c/a\u003e\u003cbr /\u003e\n      \u003csub\u003eAI/ML Engineer\u003c/sub\u003e\n    \u003c/td\u003e\n    \u003ctd align=\"center\"\u003e\n      \u003ca href=\"https://github.com/915-Muscalagiu-AncaIoana\"\u003e\n        \u003cimg src=\"https://github.com/915-Muscalagiu-AncaIoana.png\" width=\"100px;\" alt=\"Anca Ioana Muscalagiu\"/\u003e\u003cbr /\u003e\n        \u003csub\u003e\u003cb\u003eAnca Ioana Muscalagiu\u003c/b\u003e\u003c/sub\u003e\n      \u003c/a\u003e\u003cbr /\u003e\n      \u003csub\u003eAI/ML Engineer\u003c/sub\u003e\n    \u003c/td\u003e\n     \u003ctd align=\"center\"\u003e\n      \u003ca href=\"https://github.com/paoloap-py\"\u003e\n        \u003cimg src=\"https://github.com/paoloap-py.png\" width=\"100px;\" alt=\"Paolo Perrone\"/\u003e\u003cbr /\u003e\n        \u003csub\u003e\u003cb\u003ePaolo Perrone\u003c/b\u003e\u003c/sub\u003e\n      \u003c/a\u003e\u003cbr /\u003e\n      \u003csub\u003eAI/ML Engineer\u003c/sub\u003e\n    \u003c/td\u003e\n    \u003ctd align=\"center\"\u003e\n      \u003ca href=\"https://github.com/logicalclocks\"\u003e\n        \u003cimg src=\"https://github.com/logicalclocks.png\" width=\"100px;\" alt=\"Hopsworks\"/\u003e\u003cbr /\u003e\n        \u003csub\u003e\u003cb\u003eHopsworks's Engineering Team\u003c/b\u003e\u003c/sub\u003e\n      \u003c/a\u003e\u003cbr /\u003e\n      \u003csub\u003eAI Lakehouse\u003c/sub\u003e\n    \u003c/td\u003e\n  \u003c/tr\u003e\n\u003c/table\u003e\n\n\n## License\n\nThis course is an open-source project released under the MIT license. Thus, as long you distribute our LICENSE and acknowledge your project is based on our work, you can safely clone or fork this project and use it as a source of inspiration for your educational projects (e.g., university, college degree, personal projects, etc.).\n\n----\n\n\u003ctable style=\"border-collapse: collapse; border: none;\"\u003e\n  \u003ctr style=\"border: none;\"\u003e\n    \u003ctd width=\"20%\" style=\"border: none;\"\u003e\n      \u003ca href=\"https://decodingml.substack.com/\" aria-label=\"Decoding ML\"\u003e\n        \u003cimg src=\"https://github.com/user-attachments/assets/f2f2f9c0-54b7-4ae3-bf8d-23a359c86982\" alt=\"Decoding ML Logo\" width=\"150\"/\u003e\n      \u003c/a\u003e\n    \u003c/td\u003e\n    \u003ctd width=\"80%\" style=\"border: none;\"\u003e\n      \u003cdiv\u003e\n        \u003ch2\u003e📬 Stay Updated\u003c/h2\u003e\n        \u003cp\u003e\u003cb\u003e\u003ca href=\"https://decodingml.substack.com/\"\u003eJoin Decoding ML\u003c/a\u003e\u003c/b\u003e for proven content on designing, coding, and deploying production-grade AI systems with software engineering and MLOps best practices to help you ship AI applications. Every week, straight to your inbox.\u003c/p\u003e\n      \u003c/div\u003e\n    \u003c/td\u003e\n  \u003c/tr\u003e\n\u003c/table\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://decodingml.substack.com/\"\u003e\n    \u003cimg src=\"https://img.shields.io/static/v1?label\u0026logo=substack\u0026message=Subscribe%20Now\u0026style=for-the-badge\u0026color=black\u0026scale=2\" alt=\"Subscribe Now\" height=\"40\"\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n","funding_links":[],"categories":["Jupyter Notebook"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdecodingml%2Fpersonalized-recommender-course","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdecodingml%2Fpersonalized-recommender-course","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdecodingml%2Fpersonalized-recommender-course/lists"}