Back to NumFOCUS
GSoC 2026

Stateless API for Scalable and Composable Inference in sbi

This project redesigns sbi's potential function API to eliminate stateful behavior, inconsistent IID handling, and device management bugs. The new architecture introduces a three-layer design: (1) stateless core protocol using typing.Protocol for composability, (2) explicit observation binding utilities with clear IID semantics, and (3) high-level convenience factories. This enables seamless integration with NumPyro, PyMC, and PyTorch samplers while maintaining backward compatibility through a phased migration strategy. Deliverables include refactored potential classes, comprehensive tests, migration guide, UML diagrams, and tutorial notebooks demonstrating ecosystem integration. The redesign fundamentally improves maintainability, extensibility, and reliability for both novice users and advanced practitioners.

Project details

Contributor

Jocho-Smith

Mentors

Not available

Technologies

Not listed in the archive