Stage 1 · Lesson 3 of 8
Project layout and pyproject.toml
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
- CoursePaidGrokking Python Fundamentals
Design Gurus · Beginner · $50
If your Python stops at notebooks: modules, functions, classes and error handling done properly
- CourseFreeMade With ML
Goku Mohandas · Advanced
Free: the scripting, CLI, testing and documentation lessons turn notebook code into a real project