All-Reduce Training with MPIJob

Expert · 45 minutes · 5 tasks, checked automatically · 100 points

In this expert-level lab you will run a distributed MPI job on Kubernetes using the Kubeflow MPI Operator — the same launcher/worker machinery that Horovod uses for all-reduce data-parallel training. You will install the MPI Operator (v0.8.2), create a dedicated namespace and RBAC resources, submit an MPIJob, and verify the job completes successfully. To keep the lab laptop-sized and runnable on Apple Silicon, the job runs the MPI Operator's own `mpi-pi` example (a small multi-arch image) instead of a Horovod benchmark: every worker rank computes part of an estimate of pi and the partial results are combined with an MPI collective reduction (`MPI_Reduce`), the same kind of collective that Horovod's all-reduce performs on gradients. Horovod's CPU images are several gigabytes and amd64-only, so the Horovod variant is described but not run. By the end you will understand how Kubernetes orchestrates MPI-style collective communication for data-parallel training.

What you’ll learn

How this lab works

  1. Start the lab: One click starts a real Kubernetes cluster on your computer (kind), with kubectl ready in a toolbox terminal.
  2. Work through 5 tasks: Each task says what to build or fix. You do it yourself, in a real terminal, with hints when you get stuck.
  3. Check your work: Check my work reads your live cluster and says, task by task, what passed and what to fix.
  4. Finish and keep going: 100 points, your progress saved, and the next lab to try.

What it runs on

What you need

Topics: mlops, distributed-training, horovod, mpi, all-reduce, kubeflow, mpi-operator, pytorch, kubernetes

Create a free account to start this lab.

Keep going