You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
EnsemblePosterior.map(x=..., individually=True) fails with a deprecation error #2121
EnsemblePosterior.map() takes an observation x. The joint MAP uses it. With individually=True, the ensemble passes x on to the map() of each component. All other posteriors deprecated x in map() in favour of set_default_x(), so this call always fails.
ValueError: Passing `x` directly to `.map()` has been deprecated.Use `.self_default_x()` to set `x`, and then run `.map()`
The message also has two typos: a missing space after "deprecated." and .self_default_x() instead of .set_default_x().
Proposed fix
I think EnsemblePosterior.map() should deprecate x as well, like all other posteriors. set_default_x() on the ensemble already sets the observation on every component, so both paths then behave the same. The fix should also correct the message.
Ran into this while checking the ensemble MAP individually=True just forwards x into
each component's map() and every other posterior already dropped x in favour of
set_default_x(), so that path always raised I deprecated x in EnsemblePosterior.map()
as well — set_default_x() already pushes the observation down to all components, so the
joint and individual MAP now go through the same code Moved the check into one helper
on NeuralPosterior and reused it in VectorFieldPosterior which also removes the
duplicated block and fixes the two typos in the message Test covers individual + joint
MAP from a default x plus both x= paths raising ruff pyright and the ensemble tests
pass
Activity
BHARATH0153 commentedon Oct 29, 2026
Ran into this while checking the ensemble MAP individually=True just forwards x into
each component's map() and every other posterior already dropped x in favour of
set_default_x(), so that path always raised I deprecated x in EnsemblePosterior.map()
as well — set_default_x() already pushes the observation down to all components, so the
joint and individual MAP now go through the same code Moved the check into one helper
on NeuralPosterior and reused it in VectorFieldPosterior which also removes the
duplicated block and fixes the two typos in the message Test covers individual + joint
MAP from a default x plus both x= paths raising ruff pyright and the ensemble tests
pass
fix: deprecate x in EnsemblePosterior.map and correct the message
fix: deprecate x in EnsemblePosterior.map and correct the message
fix: deprecate x in EnsemblePosterior.map and correct the message
fix: deprecate x in EnsemblePosterior.map and correct the message
fix: deprecate x in EnsemblePosterior.map and correct the message
fix: deprecate x in EnsemblePosterior.map and correct the message
fix: deprecate x in EnsemblePosterior.map and correct the message
fix: SMCABC epsilon quantile and EnsemblePosterior.map deprecation (s…