Machine learning project project structure

Machine learning project project structure

Explorer

  • .venv…, not committed
  • .env, not committed
  • .gitignore
  • .editorconfig
  • LICENSE
  • Makefile
  • README.md
  • pyproject.toml
  • uv.lock
  • data
  • external
  • raw.dvcnew
  • .dvcnew
  • confignew
  • config.localnew, not committed
  • .gitignorenew
  • cache…new, not committed
  • .dvcignorenew
  • notebooks
  • .gitkeep
  • 1.0-ab-initial-data-exploration.ipynb
  • 2.0-ab-feature-ideas.ipynbnew
  • 3.0-ab-error-analysis.ipynbnew
  • README.mdnew
  • churn_prediction
  • __init__.py
  • config.py
  • dataset.py
  • features.py
  • plots.py
  • params.pynew
  • schemas.pynew
  • reproducibility.pynew
  • models
  • model.joblibnew, not committed
  • references
  • data-dictionary.mdnew
  • data-sources.mdnew
  • reports
  • figures
  • metrics.jsonnew
  • docs
  • README.md
  • mkdocs.yml
  • .gitkeep
  • tests
  • test_data.py
  • conftest.pynew
  • params.yamlnew
  • mlflow.dbnew, not committed
  • .env.examplenew
  • .pre-commit-config.yamlnew
  • docker-compose.ymlnew
  • .vscodenew
  • settings.jsonnew
  • extensions.jsonnew
  • launch.jsonnew
  • AGENTS.mdnew
  • CLAUDE.mdnew
  1. # Install the ccds command (the docs recommend pipx)

    pipx install cookiecutter-data-science
  2. # Generate the project; pick uv, pyproject.toml, basic packages, pytest, ruff and mkdocs at the prompts

    ccds
  3. # Create the environment and install dependencies (runs uv venv, then uv sync)

    cd churn-prediction && git init && make create_environment && make requirements
  4. # Growing: version data, validate it and track runs

    uv add dvc pandera mlflow pyarrow pyyaml && dvc init && dvc add data/raw
  5. # Growing: strip notebook outputs and lint on every commit

    uv add --dev pre-commit nbstripout pytest-cov hypothesis && uv run pre-commit install
  6. # Production: serve and monitor

    uv add "fastapi[standard]" pydantic-settings prometheus-client evidently
  7. # Rebuild data, features, model and metrics from scratch

    uv run dvc repro