Changelog
This changelog is generated automatically from GitHub Releases.
seapig - Initial Zenodo Release
2026-05-03 · GitHub
Initial Release for Zenodo. See the original release notes.
seapig v0.1.0 - Initial Release
2026-05-03 · GitHub
A lightweight library for confidence‑based selective inference for deep models. seapig provides small, composable confidence scores operating on model embeddings (or logits), calibration utilities, and a PyTorch Lightning task + torchmetrics wrapper to evaluate selective systems.
Highlights
- Fast, interpretable confidence scores based on latent representations and logits.
- Calibration on an independent validation set to fix target coverage levels.
- Select/abstain decision utilities that produce per-sample scores and binary selections.
- Seamless integration with PyTorch Lightning via SelectiveInferenceTask and torchmetrics compatibility.
- Small, dependency‑scoped core with optional extras for recommended features, docs, and development.
Main features
- Score fitting APIs:
- Fit from pre-computed embeddings or extract embeddings on the fly from models/loaders.
- Calibration via empirical quantiles (
set_threshold(q=...)).
- Built-in scores:
- distance-based: EuclideanScore, CosineScore, MahalanobisScore
- logit-based: EnergyScore, EntropyScore, LogitScore, MarginScore, SoftmaxScore
- reconstruction-based: PCAScore
- PyOD-based: PyODScore
- Other: RandomScore
- SelectiveInferenceTask: evaluate and predict with Lightning models while applying selective inference
- SelectiveMetric: wraps any torchmetris
MetricandMetricCollectionto reporting metrics for full/selected/rejected subsets. - Utilities: progress-control, logging adapter, lightweight helper functions.
Quick install
- PyPI: pip install seapig
- Latest: pip install git+https://github.com/goergen95/seapig.git
- Extras: seapig[suggested], seapig[dev], seapig[docs]
Docs & examples
- Getting started, API reference and tutorials: www.seapig.dev
Tests, quality & license
- Tests included (pytest) and type hints present (py.typed).
- CI and coverage badges maintained in repo.
- License: MIT (see LICENSE)
- Code of conduct: .github/CODE_OF_CONDUCT
Citation
- CITATION.cff included for academic use.
Contact / contribution
- Contributions welcome — follow the repository’s contributing guidelines and run make check (formatting, linting, tests) before submitting PRs.