meridian.backend.RNGHandler

JAX implementation of the RNGHandler using explicit key splitting.

seed The initial seed, which must be a Python integer, a sequence of two integers, a scalar integer Tensor/array, or None.

ValueError If the provided seed is invalid.

Methods

advance_handler

View source

Creates a new, independent RNGHandler for a subsequent operation.

This method is used to generate a new handler derived deterministically from the current handler's state.

Returns
A new, independent RNGHandler instance.

get_kernel_seed

View source

Provides a backend-appropriate sanitized seed/key for an MCMC kernel.

This method exposes the current state of the handler in the format expected by the backend's MCMC machinery. It does not advance the internal state.

Returns
A backend-specific seed object (e.g., a JAX PRNGKey or a TF Tensor).

get_next_seed

View source

Provides the appropriate seed object for the next sequential operation.

This is primarily used for prior sampling and typically advances the internal state.

Returns
A backend-specific seed object for a single random operation.