executing-plans
executing-plans
Use when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available
effect-handlers-and-enumerationUse Pyro poutine effect handlers, traces, discrete enumeration, reparameterizers, and inference-tied tensor ops.
Independent GitHub snapshot · Automated classification · Original documentation governs
Use this sub-skill when the task involves Pyro's poutine stack, trace/replay/
condition/block/scale/mask/seed/substitute/reparam handlers, discrete latent
variable enumeration, posterior decoding with infer_discrete, TraceEnum_ELBO
or Tensor Monte Carlo setup, reparameterizers, or inference-adjacent pyro.ops
utilities such as Vindex, plated einsum, HMM contraction helpers, and stats.
This guidance targets the pyro-ppl 1.9.1 API family imported as pyro. It is
self-contained; do not rely on the source checkout, original notebooks, or
example scripts at runtime.
TraceEnum_ELBO, config_enumerate, infer_discrete,
max_plate_nesting, first_available_dim, TMC/funsor caveats,
reparameterizer config patterns, and selected pyro.ops utilities, read
references/enumeration-and-reparameterization.md.funsor, JIT warnings, trace shape errors, handler order surprises,
or reparameterizer failures, read references/troubleshooting.md.python scripts/enumeration_trace_smoke.py --help; defaults are
intentionally short and deterministic.Use this sub-skill for requests like:
cond_indep_stack";poutine.block or expose only selected
sample/param sites";TraceEnum_ELBO, compute MAP or
sampled discrete states with infer_discrete, or debug enum dimensions";AutoReparam, LocScaleReparam, TransformReparam, StableReparam,
LinearHMMReparam, SplitReparam, NeuTraReparam, or related config";Vindex, plated pyro.ops.contract.einsum, HMM Gaussian contractions,
or pyro.ops.stats diagnostics where they support inference code".pyro.sample/pyro.param introductions,
parameter-store lifecycle, pyro.plate basics, validation, RNG, or
PyroModule: route to ../modeling-basics/..to_event(), batch/event shape
algebra, HMM distribution constructors, and generic shape debugging: route to
../distributions-and-shapes/.../svi-and-autoguides/ after the enumeration/handler contract is clear.Predictive: route to ../mcmc-and-prediction/, using this sub-skill only
for conditioning/replay/reparameterizer details.pyro.contrib.funsor workflows,
Horovod/Lightning/Graphviz/torchvision/pandas/scanpy extras, and long HMM
demos: route to ../contrib-and-domain-workflows/. Treat them as optional or
unverified unless the active user environment proves support.trace.compute_log_prob() before reading per-site
log_prob; use trace.format_shapes() in every shape/debug answer.max_plate_nesting to the number of nested vectorized
plates around enumerated/observed sites, then allocate enum dimensions to the
left with first_available_dim = -1 - max_plate_nesting.infer={"enumerate": "parallel"};
model-side sequential enumeration is not implemented. Guide-side sequential
enumeration is supported but can multiply execution count.pyro.ops.indexing.Vindex or broadcasting-safe tensor code; do not branch on
a parallel-enumerated tensor value.funsor, CUDA, Horovod, Lightning, Graphviz, torchvision, pandas, and
scanpy as optional/unverified in the minimum environment unless the current
runtime explicitly imports them.