Spaces:
Runtime error
Runtime error
A newer version of the Gradio SDK is available: 6.22.0
Contributing
This is a capstone project; the workflow is deliberately strict so main stays
clean and every change is reviewable.
Branch model
mainis protected by convention β never push to it directly. It only moves via reviewed merges from a feature branch.- Feature branches are named
checkpoint-<N>-<short-desc>where:<N>is a monotonically increasing integer (so the history reads in order).<short-desc>is a 2β4 word kebab-case summary, e.g.checkpoint-2-refactor-and-docs,checkpoint-3-fastapi-demo.
- The first checkpoint (
checkpoint-1-baseline) snapshots the state ofmainat v0.1.0 so we have an immutable reference point before any new work.
Workflow
# 1. Find the next N
git fetch origin
git branch -r | grep -E 'origin/checkpoint-[0-9]+-' | sort
# 2. Branch off main
git checkout main && git pull
git checkout -b checkpoint-<N>-<short-desc>
# 3. Make changes, run tests, commit
pytest -q
git commit -m "..."
# 4. Push and open a PR
git push -u origin checkpoint-<N>-<short-desc>
gh pr create --base main --title "..." --body "..."
# 5. Reviewer merges via the GitHub UI / `gh pr merge`
Commit hygiene
- Run
pytest -qbefore each commit. We require all tests to pass onmain. - Keep commits scoped β one concern per commit; bigger changes go in multiple commits on the same branch.
- No secrets, no large artifacts. Model weights belong in GitHub releases; raw
data lives in
data/raw/which is gitignored.
Code style
The project optimises for readable, small files over clever abstractions. Concrete preferences:
- KISS β prefer two clear lines over one clever expression. Each module should be readable end-to-end in under 5 minutes.
- Single responsibility β files do one job.
ccdp.utils.deviceonly picks devices;ccdp.utils.transformsonly builds torchvision pipelines. - Shared base classes only when there's real duplication.
BaseVariantPipelineexists because Variant A and B genuinely share the XGBoost + FX + provenance flow; we don't manufacture base classes for things that happen to look similar. - Docstrings on every module explain what the module is for and why it exists separately from its neighbours, not how every line works.
- Type hints on public surfaces. Internal helpers can skip annotations when the type is obvious from context.
- No emojis in source code (PRs and chat are fine).
Testing
pytest -qruns the full suite β currently 64 tests.- Tests live in
tests/and use onlypytest(no plugins beyondpytest-covwhich is optional). - Network / GPU / large-dataset tests are skipped when their prerequisites are
absent (see the
@pytest.mark.skipifguards on Stanford Cars / iaai tests). - New behaviour needs at least one test; complex new logic needs a few.
Trained models
- Don't commit weights to git. Use GitHub Releases.
- Each release version corresponds to a tag on
main. Usegh release create vX.Y.Zwith weights attached as assets. - Promotion via
ccdp registry promote <run_id> <variant>is the only thing that should move thecheckpoints/production/<variant>.ptsymlink.
Project structure
See README.md for the source-tree layout and execution flow. For the rationale behind each phase, see PLAN.md and the per-phase status docs under progress/.