0Pricing
Learn AI with Python · Lesson

Professional AI Project Directory Structure

data/, notebooks/, src/, models/, tests/ layout, cookiecutter-data-science pattern.

Professional AI Project Directory Structure is a free Learn AI with Python lesson on CoddyKit — lesson 1 of 4. You can read the complete lesson below for free — then practise it hands-on in the browser with a built-in code editor and a 24/7 AI tutor. It is part of the Learn AI with Python learning path, one of 4 lessons in the course, and your progress syncs across the web and the CoddyKit app.

Why Structure Matters

A pile of notebooks named final.ipynb, final2.ipynb, and really_final.ipynb is how AI projects die. A consistent directory structure makes projects readable, reproducible, and collaboration-friendly.

This lesson covers the widely-used Cookiecutter Data Science layout.

The data Folder

Separate data by processing stage so raw inputs are never overwritten:

  • data/raw/ — original, immutable source data
  • data/processed/ — cleaned, model-ready data
  • data/interim/ — intermediate transformations

Treat data/raw as read-only — you should always be able to regenerate everything else from it.

Why Raw Is Immutable

If a cleaning bug corrupts your only copy of the data, the project is sunk. Keeping data/raw untouched means every processed file is reproducible by re-running your pipeline.

Processed outputs are disposable; raw is sacred.

The notebooks Folder

notebooks/ holds exploration and reporting notebooks. A common convention is to number them by stage and add initials, e.g. 1.0-mk-eda.ipynb.

Notebooks are for exploration; reusable logic should graduate into src/.

The src Package

src/ contains the importable Python code, split by responsibility:

  • src/data/ — loading and processing scripts
  • src/features/ — feature engineering
  • src/models/ — training and prediction code
  • src/visualization/ — plots and reports

src/features and src/models

Keeping feature engineering and modeling in separate modules pays off: you can unit-test feature code, reuse it across notebooks, and swap models without rewriting data prep.

from src.features.build_features import make_features
from src.models.train import train_model

X = make_features(df)
model = train_model(X, y)

The models Folder

models/ stores serialized trained artifacts (e.g. model.pkl, model.joblib). These are outputs, not source code.

Large model files usually should not go in Git — track them with DVC or object storage instead (covered next lesson).

The reports Folder

reports/ holds generated outputs for humans: reports/figures/ for plots and a top-level report document. These are produced by your code, so they can be regenerated.

Config and Environment Files

Round out the project with project-level files:

  • requirements.txt or environment.yml — dependencies
  • config.yaml — hyperparameters and paths
  • README.md — what the project is and how to run it
  • .gitignore — what Git should skip

The Full Layout

Putting it together, a clean AI project looks like this:

project/
  data/
    raw/
    interim/
    processed/
  notebooks/
  src/
    data/
    features/
    models/
    visualization/
  models/
  reports/
    figures/
  config.yaml
  requirements.txt
  README.md

Generating It with Cookiecutter

You do not build this by hand every time. The cookiecutter-data-science template scaffolds the whole structure in one command.

# pip install cookiecutter
# cookiecutter -c v1 https://github.com/drivendata/cookiecutter-data-science
# Answer a few prompts -> full project tree created

Quick Check: Where Does Raw Data Go?

You download an original CSV from a data provider.

Recap: Project Structure

You learned the professional AI project layout:

  • data/raw (immutable), data/processed for stages
  • notebooks/ for exploration, src/features and src/models for reusable code
  • models/ for artifacts, reports/ for outputs
  • Config, requirements, README, and .gitignore at the root
  • cookiecutter-data-science to scaffold it instantly

Next: using Git effectively on AI projects.

Frequently asked questions

Is the “Professional AI Project Directory Structure” lesson free?

Yes — the full text of “Professional AI Project Directory Structure” is free to read here on the web, and the Learn AI with Python course includes 4 lessons in total. To practise it interactively (a built-in code editor and a 24/7 AI tutor) and unlock the rest of the Learn AI with Python course, upgrade to CoddyKit PRO.

What will I learn in “Professional AI Project Directory Structure”?

data/, notebooks/, src/, models/, tests/ layout, cookiecutter-data-science pattern. You practise Learn AI with Python with hands-on code you run directly in the browser, and a 24/7 AI tutor answers your questions as you work through the lesson.

Do I need any experience to start Learn AI with Python?

No prior experience is required. Learn AI with Python on CoddyKit is structured for beginners through advanced learners; this is — lesson 1 of 4, so you can start here or from the beginning and move at your own pace.

How long does the “Professional AI Project Directory Structure” lesson take?

Most CoddyKit lessons take about 5–10 minutes. Each one is bite-sized and interactive, so you make steady progress and pick up exactly where you left off across the web and the app.

Can I write and run code in this Learn AI with Python lesson?

Yes. Every Learn AI with Python lesson includes a built-in code editor, so you write and run real code right in your browser and get instant AI feedback — no local setup required.

All lessons in this course

  1. Professional AI Project Directory Structure
  2. Git for AI Projects
  3. Reproducibility: Seeds, Configs, and Environments
  4. Jupyter Notebooks Best Practices
← Back to Learn AI with Python