Kaggle/learntools

Tools and tests used in Kaggle Learn exercises

What it solves

Kaggle Learn's interactive courses need to automatically check whether a learner's exercise code is correct and give feedback. This repository contains the checking logic and the course materials (notebooks) that make those courses work, all in one place.

How it works

The repo has two main parts. The learntools folder is a Python package that provides feedback. It splits into per-course modules (e.g., learntools/python for the Python course, learntools/machine_learning for the ML course) and a core module that supplies the shared infrastructure those course modules use. The notebooks folder holds the raw course notebooks plus templating tools that convert them into the final format uploaded to Kaggle. Some courses keep their notebooks inside the learntools package instead, when they were authored outside the templating system.

Who it's for

Primarily the Kaggle Learn team and contributors who maintain or update course content. The README explicitly says these materials "haven't been designed to work independently and likely aren't useful outside of Kaggle Learn." So it's not a general-purpose learning tool for end users.

Highlights

  • Open-source code behind Kaggle Learn's exercise checking.
  • Modular design: per-course checkers plus a shared core.
  • Includes the source notebooks for courses and a templating system to generate the published versions.
  • Tests are runnable via a script (test.sh) against different Docker images and can target specific tracks or individual exercises.

Related

  • Project
  • Project
  • Project
  • Project