FoundationsBeginner3h

Jupyter & Colab.

Notebooks, the ML workflow, and free GPUs.

What are Jupyter and Colab?

Jupyter notebooks mix code, output, and notes in one document, run cell by cell — ideal for the explore-and-iterate rhythm of ML. Google Colab is a hosted Jupyter that gives you a free GPU in the browser, removing the biggest barrier for beginners.

Why it matters

Notebooks are where most ML experimentation happens, and Colab means you can train real models without owning expensive hardware. Knowing the workflow — and its sharp edges — makes you productive immediately and matches how tutorials and courses are delivered.

What to learn

  • Cells, execution order, and the kernel
  • Markdown cells for notes and explanation
  • Colab and enabling a free GPU runtime
  • Installing packages in a notebook
  • Saving, sharing, and versioning notebooks
  • When to graduate from notebooks to scripts
  • Restarting the kernel to escape bad state

Common pitfall

Running cells out of order and relying on hidden state, so the notebook only works because of variables defined in a cell you have since changed or deleted. The result cannot be reproduced. Periodically restart the kernel and run all cells top to bottom to confirm the notebook actually works as written.

Resources

Primary (free):

Practice

Open a Colab notebook, enable the GPU runtime, install a package, and run a few cells mixing code and markdown notes. Then deliberately run cells out of order, notice the confusion, and fix it with "restart and run all." Done when your notebook reproduces cleanly from a fresh kernel.

Outcomes

  • Work fluently with notebook cells and the kernel.
  • Enable a free GPU runtime in Colab.
  • Avoid hidden-state bugs by restarting and running all.
  • Know when to move from a notebook to a script.
Back to AI / ML roadmap