MLOps and LLMOps

Stage 1 · Lesson 3 of 8

Project layout and pyproject.toml

From notebook to package

A Python project keeps importable code under src/<package>/, tests under tests/, and declares its name, dependencies, entry points and tool settings in one pyproject.toml file. Split code by job: loading data, building , training or calling the model, evaluating and serving.

Each module should do one thing and be importable by the training job, the and the tests alike. The (code inside a src folder) stops tests from accidentally importing files that were never installed. A clear layout also makes the repository readable to a reviewer in two minutes, which matters for a portfolio.

Common trapone 800-line train.py that loads, cleans, trains, evaluates and uploads, which nobody can test or reuse from the serving code.

A question to check yourself, an AI practice session and 1 cheat sheet entry come with the full roadmap. Unlock

Resources for this stage

Start with· follow one of these

  • CoursePaid
    Grokking Python Fundamentals

    Design Gurus · Beginner · $50

    If your Python stops at notebooks: modules, functions, classes and error handling done properly

  • CourseFree
    Made With ML

    Goku Mohandas · Advanced

    Free: the scripting, CLI, testing and documentation lessons turn notebook code into a real project

Practise

  • Free exercises that make you build, run and debug images until Dockerfiles feel routine

Keep handy

Also worth your time

Mark this stage as not done?