register_transition

register_transition#

hybrid_aif.register_transition(name, cls)[source]#

Register cls, the class of a NonlinearGaussianTransition’s f, under name, so that describe() writes such an f as its name and its fields and build() rebuilds it.

name is namespaced, "<package>.<name>" (at least one dot, each segment an identifier), so two packages cannot collide silently. cls is a callable equinox.Module subclass. The registration records cls’s field schema: each field’s name and whether it is static (eqx.field(static=True)) or a leaf; a leaf’s shape is an instance’s, not the class’s, and is checked when the built System is validated. A name is registered once and a class under one name: registering a taken name, or a class already registered, raises ValueError. Returns cls. Design: docs/design/nonlinear-transitions.md N5.