Let’s Rust
Course description
A live, practical course where we will together (without lengthy theory) create a working ML product in Rust: train a model, package it, and set up a REST API for predictions, and then deploy the service in Kubernetes. The course is truly "live": the instructor does not position themselves as a die-hard Rust guru — we proceed step by step, relying on dialogue with a code assistant and focusing on the result.
Read more about the course
What you will build
- A training pipeline for the model: loading CSV, feature engineering in Polars, training, and saving the artifact.
- A simple model "registry" based on Amazon S3 (uploading the artifact).
- A REST API in Rust for online predictions: loading the model, processing the request, and providing the response.
- Demonstration of deployment in Kubernetes (how to build, package, and launch the service).
Why Rust (and what you will have to come to terms with)
- Pros: high speed, memory and hardware efficiency - lower production costs, strict typing, and safety.
- Cons: syntax is more complex than Python; you'll need to get used to compilation and tools. We don't "become experts in 4 evenings" - we build a working thing and along the way master key concepts (struct, trait, crate, working with packages, etc.).
Result
By the end of the course, you will have a working service in Rust for ML model inference, an understanding of key tools in the ecosystem, and "muscle memory" for assembling production-ready components. As a bonus, you will also become more precise in Python: a new language broadens your perspective and disciplines your architecture.
Watch Online
All Course Lessons (64)
| # | Lesson Title | Duration | Access |
|---|---|---|---|
| 1 | Introduction to the course Demo | 08:20 | |
| 2 | What is the goal of this course? | 08:52 | |
| 3 | Why Rust? | 15:17 | |
| 4 | Our plan | 10:43 | |
| 5 | Installing the tools: rustc, cargo, rust-analyzer | 16:28 | |
| 6 | How to generate and run the binaries | 21:04 | |
| 7 | Steps to train an ML model in Rust | 10:00 | |
| 8 | How to download the CSV file - Part 1 | 26:56 | |
| 9 | How to handle errors and Results with anyhow and ? | 20:22 | |
| 10 | Generic types, traits and trait bounds in function definitions | 23:10 | |
| 11 | How to download the CSV file - Part 2 | 10:37 | |
| 12 | Wrap up | 03:17 | |
| 13 | Goals for today | 05:04 | |
| 14 | Load the CSV file into memory with Polars Rust | 18:15 | |
| 15 | Extract functions to lib.rs | 05:11 | |
| 16 | Splitting the data into training and test - Part 1 | 25:31 | |
| 17 | Splitting the data into training and test - Part 2 | 18:33 | |
| 18 | Questions and answers | 04:06 | |
| 19 | Split datasets into features and targets | 12:21 | |
| 20 | Transforming Polars DataFrame to DMatrix for XGBoost training | 24:43 | |
| 21 | Training the XGBoost model - Part 1 | 20:48 | |
| 22 | Questions and answers | 02:53 | |
| 23 | Training the XGBoost model - Part 2 | 12:04 | |
| 24 | Pushing the model artifact to AWS S3 bucket | 18:41 | |
| 25 | How to set up your AWS credentials to talk to your S3 bucket | 01:48 | |
| 26 | Wrap up | 01:49 | |
| 27 | Goals for today | 03:35 | |
| 28 | Tip -> devcontainers | 05:08 | |
| 29 | Add 2 entry points, one for training, one for REST API | 05:55 | |
| 30 | Questions and answers | 02:35 | |
| 31 | Building a minimal API with health endpoint - Part 1 | 19:55 | |
| 32 | Building a minimal API with health endpoint - Part 2 | 10:25 | |
| 33 | Adding a predict endpoint to our REST API | 22:20 | |
| 34 | Tip -> How to break a large problem into smaller (easier) ones | 02:34 | |
| 35 | Download model artifact from AWS S3 bucket | 23:37 | |
| 36 | Refactorings -> Break our lib.rs into separate files | 17:27 | |
| 37 | Adding CLI parameters for training using Clap | 11:24 | |
| 38 | Loading the model from S3 into memory | 07:39 | |
| 39 | Adding model to the AppState so we can use it in our predict functions - Part 1 | 21:03 | |
| 40 | Adding model to the AppState so we can use it in our predict functions - Part 2 | 07:46 | |
| 41 | Wrap up | 02:32 | |
| 42 | Plan for today | 02:17 | |
| 43 | Transform input payload to dmatrix for XGBoost | 21:04 | |
| 44 | Formatting the response with the prediction | 15:42 | |
| 45 | Extracting the port number as input argument | 07:26 | |
| 46 | Two challenges for you | 11:22 | |
| 47 | Dockerizing the API - Part 1 | 20:40 | |
| 48 | Trick -> How to solve Docker no space left problems | 06:49 | |
| 49 | Dockerizing the API - Part 2 | 23:00 | |
| 50 | Dockerizing the API - Part 3 | 22:35 | |
| 51 | Dockerizing the API - Part 4 | 21:47 | |
| 52 | Dockerizing the API - Part 5 | 07:43 | |
| 53 | Dockerizing the API - Part 6 | 01:51 | |
| 54 | Wrap up | 02:37 | |
| 55 | 00 - Intro | 02:49 | |
| 56 | 01 - Bootstrap the project | 04:27 | |
| 57 | 02 - Hello world with a /health endpoint | 21:43 | |
| 58 | 03 - A bit of refactoring | 02:58 | |
| 59 | 04 - Add a /predictions endpoint | 08:39 | |
| 60 | 05 - Break down project in several files | 08:28 | |
| 61 | 06 - Start Postgres DB with Docker | 07:52 | |
| 62 | 07 - Fetch data from Postgres | 20:28 | |
| 63 | 08 - Loading environment variables | 02:07 | |
| 64 | 09 - Add GET parameter to the /predictions endpoint and compile for release | 04:57 |
Unlock unlimited learning
Get instant access to all 63 lessons in this course, plus thousands of other premium courses. One subscription, unlimited knowledge.
Learn more about subscriptionBooks
Read Book Let’s Rust
| # | Title |
|---|---|
| 1 | session 1 |
| 2 | session 2 |
Comments
0 commentsWant to join the conversation?
Sign in to commentSimilar courses
Rust from C/C++
Ultimate Rust: Foundations - Next Steps
Rust for Beginners
Rust Developer Bootcamp