Thanks for your interest. This is a small, focused scientific package; the bar is honest provenance, correct numerics, and a green gate.
git clone https://github.com/madhavcodez/cortex-score
cd cortex-score
python -m venv .venv && . .venv/bin/activate # Windows: .venv\Scripts\activate
pip install -e ".[dev,cli]"The base install is CPU-only (numpy + pydantic + platformdirs). The full
score() path needs the GPU stack - see docs/install-gpu.md.
ruff check src tests
ruff format --check src tests
mypy src # config is strict=true
pytest -m "not slow and not gpu" --cov=cortex_score --cov-report=term-missing
pytest tests/integration/test_packaging.py -m slow # build + twine + wheel contents- Coverage must not drop below 80% (it currently sits well above).
import cortex_scoremust stay torch-free: heavy ML deps load lazily inside runners.tests/integration/test_score_import.pyguards this.- GPU-only code lives behind
@pytest.mark.gpuand is exercised byexamples/modal_smoke.py.
- Schema discipline.
SCHEMA_VERSIONinsrc/cortex_score/schemas.pyis a contract. Any field add/remove/rename/relaxation → bump it, regeneratetests/fixtures/schema_v1.jsonandtests/fixtures/score_result_v1.json, and document it inCHANGELOG.md. The JSONschema_versionis independent of the package version. - No scientific overclaiming. The 5-network rollup is a product grouping,
not canonical neuroscience (see
docs/interpretation.md). The "Not a brain scan / does not measure real viewer engagement" framing must survive everywhere. - No fabricated numbers. Benchmark/cost figures in docs must come from a
real, reproducible run (e.g.
benchmarks/bench_aggregate.py,examples/modal_smoke.py). - Reproducible provenance.
result_idmust remain verifiable from the serialized JSON alone (compute_result_id).
- Conventional commits:
feat:,fix:,refactor:,docs:,test:,build:,chore:,perf:,ci:. Explain why, not just what. - Keep PRs focused. Update
CHANGELOG.mdunder[Unreleased].
Implement the PredictionRunner protocol (model_id, model_revision,
predict_video) and return a PredictionBundle on fsaverage5. See
cortex_score.runners.replay.ReplayRunner for a minimal, torch-free example.
Versions are git-tag driven (hatch-vcs). Cutting a release means: move
[Unreleased] notes into a dated section, bump CITATION.cff
version/date-released to match (a test enforces this), then push a
vX.Y.Z tag - the release workflow builds and publishes to PyPI via OIDC
trusted publishing. See SECURITY.md for the supply-chain
posture.