Skip to the workspace
Pebellslearn by building
What is MLOps?  ›  Capstone Project

Python, Bash and Go in MLOps

Python 10 minPython is the language of models and pipelines, Bash glues tools and CI steps together, and Go powers much of the infrastructure MLOps runs on.

mlops / Python, Bash and Go in MLOps

Explore each scene at your own pace.

01 · The rule

The rule

Python, Bash and Go in MLOps

An MLOps engineer on the churn project might write a feature function in the morning, fix a CI script before lunch, and read a Kubernetes error in the afternoon. Those three jobs lean on three different languages. You do not need to master all of them, but you need to know which one each job speaks.

The rule

Python builds the model, Bash glues the tools, Go runs the platform.

Python is where models live. Data loading (pandas), training (scikit-learn, PyTorch), tracking (MLflow) and pipelines (Airflow) all have Python APIs, so feature code, training scripts and small prediction services are written in it.

def skips_per_week(events, user_id):
    skips = events[(events.user_id == user_id) & (events.action == "skip")]
    return len(skips) / 4  # the table holds four weeks of events

Bash is the glue between command-line tools. CI steps, container entrypoints and "download, then test, then upload" chores are short shell scripts:

#!/usr/bin/env bash
set -euo pipefail   # stop at the first failing command
dvc pull
pytest tests/
python train.py

set -euo pipefail is the habit to keep: without it, a failed dvc pull would be ignored and training would run on missing data.

Go is the language much of the platform underneath is written in: Kubernetes, Docker and Prometheus. Most MLOps engineers read Go more than they write it — when debugging a tool, writing a small Kubernetes operator, or building a fast network service.

Scene 1 of 5
Hover to wake the cannons. Drag to move, or use arrow keys when focused. Press Enter to fire a shot.