git clone https://github.com/evalvitals/evalrx.git
cd evalrx
pip install -e ".[dev]"
pip install torch --index-url https://download.pytorch.org/whl/cpu # CPU torch for testspytest -m "not gpu" # fast unit tests, no GPU needed (~165 tests)
pytest --run-gpu # GPU integration tests (requires CUDA + cached weights)ruff check .
mypy evalrx --ignore-missing-imports- Add a
ModelSpecentry inevalrx/specs.py(_add(ModelSpec(key=..., ...))). - If white-box internals are needed, add
evalrx/models/whitebox/<family>.py— declarecapabilities+ implementforward(inputs, capture) -> Trace— and register with@register_model. - The
compose()function inevalrx/models/compose.pywires everything together; no changes needed there for a new spec-only model. - Write a unit test in
tests/test_models/usingFakeModelfromtests/conftest.py(no GPU needed). - Run
python tools/gen_analyzer_docs.pyto add the spec to the model tables indocs/analyzers.md.
See docs/extending.md for a full walkthrough.
- Create
evalrx/analyzers/<category>/<name>.py. - Declare
name,requires(frozenset ofCapability), andapplies_to_modalities. - Implement
_run(self, model, cases: CaseBatch) -> Result. - Decorate with
@register_analyzer("<name>"). - Import the new module in
evalrx/analyzers/<category>/__init__.py. - Write a unit test using
FakeModel. - Run
python tools/gen_analyzer_docs.pyand fill in the new row's name and Paper indocs/analyzers.md.
The new analyzer is instantly discoverable via registry.analyzers.names_compatible_with(model) — no other code changes needed.
- Keep PRs focused: one analyzer, one model, or one infrastructure change per PR.
- All CI checks (ruff, mypy, pytest fast suite) must pass.
- Add or update the relevant entry in
CHANGELOG.mdunder[Unreleased]. - Include paper citations (arXiv link + BibTeX key) for any method from the literature.