Sefism is free for learners. We are here to help you grow, one step at a time.Join for free
Sefism.

Project structure · AI and ML

Machine learning project project structure

Opens with credits

For students and analysts whose model works in a notebook and now needs to be reproducible, reviewable, served and watched. It starts from the Cookiecutter Data Science v2 layout (immutable raw data, numbered notebooks, a real Python package) and grows into versioned data with DVC, typed parameters, data validation with pandera, experiment tracking and a model registry with MLflow, a FastAPI prediction service, drift monitoring and, for a team, scheduled retraining, model cards, fairness checks and shadow deployment.

Curated by Tauseef FayyazIntermediate169 files and foldersCookiecutter Data Science 2.3 (ccds), Python 3.12, uv 0.12Checked October 2026
Explore the filesPick any file to see what it is, why it exists and when you add it.

How it grows

Each stage opens the explorer there

  1. 1Day 1What the scaffold and your first hour give you42 files and folders
  2. 2GrowingWhat a real app with features and tests adds+44 files and folders
  3. ProductionWhat running it for real users adds+47 files and foldersOpens with credits
  4. ExpertWhat a team needs to keep it healthy for years+36 files and foldersOpens with credits

How it is organised

  • Raw data is immutable: never edit files in data/raw. Every cleaned or derived file can be rebuilt from raw data plus code with one command (dvc repro).
  • Notebooks are for exploring and explaining; code that matters moves into the package (dataset, features, modeling) where it can be imported, tested and reused. Outputs are stripped before commit.
  • Preprocessing is part of the model: a scikit-learn Pipeline holds encoders and the estimator together, and the same feature code runs in training and serving, so production never sees differently prepared data.
  • Parameters live in params.yaml (read through one typed loader), not in code. DVC tracks which stage uses which key. Hydra is a fine alternative when you need config groups and sweeps; pick one, not both.
  • Every training run is logged to MLflow (parameters, metrics, model, data version), and serving loads a registered model by alias (champion), so promoting or rolling back a model never needs a code change.
  • Test the code, the data and the model separately: unit tests for features, schema checks for data, quality gates and behaviour tests for the model.
  • Data and models live in storage built for them (DVC remote, MLflow artifact store), never in Git or in the Docker image.
  • Add Expert pieces (orchestrator, shadow deployment, fairness gates, model cards) when a model makes decisions about people or runs unattended; for a one-off analysis they are overkill.

At the top of the project

Open one in the explorer for the full story

Learn more on Sefism

Roadmaps, cheat sheets and projects that go with Machine learning project.

See 10 more
Checked against 14 official sources, October 2026. If something has changed, the docs win.Show sources

Picked from the other libraries by shared topics.

Work with me

Stuck on something specific?

Writing only gets you so far. If you want an answer to your situation rather than the general case, book a session and we will work through it together. Sessions are free for approved Sefism members, and a few slots open each week.

  • 1:1 Mentorship
  • Fresh Graduate Mentorship
  • Career Guidance

Brand deals, promos and partnerships: tauseeffayyaz@gmail.com