1 rollouts.inspection.retained_selection
rollouts.inspection.retained_selection
Recorded selector distributions over immutable rollout candidate tables.
The stored selection logits encode the final draw guard mask: finite logits were eligible, while -inf logits were excluded. This is stronger evidence than a zero probability, which can also arise from softmax underflow. Original score scale is measured on finite actor actions before those policy guards.
1.1 Classes
| Name | Description |
|---|---|
| CampaignSelectionStateRow | Recorded state plus immutable campaign and exact-pair identity. |
| HorizonPair | One factual paired prefix difference, challenger minus baseline. |
| HorizonRow | One contrast, fixed population rule and observed horizon. |
| HorizonUnit | One validated factual chain for exact-root matched prefix comparison. |
| ProfileSelectionStateRow | Fields required to decide the primary-arm two-scene scale-floor gate. |
| RecordedSelectionContract | Producer-bound admission for interpreting finite stored logits as a mask. |
| SelectionStateRow | One factual selector state with raw-score and final-draw distributions. |
1.1.1 CampaignSelectionStateRow
rollouts.inspection.retained_selection.CampaignSelectionStateRow()Recorded state plus immutable campaign and exact-pair identity.
1.1.2 HorizonPair
rollouts.inspection.retained_selection.HorizonPair()One factual paired prefix difference, challenger minus baseline.
1.1.3 HorizonRow
rollouts.inspection.retained_selection.HorizonRow()One contrast, fixed population rule and observed horizon.
1.1.4 HorizonUnit
rollouts.inspection.retained_selection.HorizonUnit()One validated factual chain for exact-root matched prefix comparison.
1.1.5 ProfileSelectionStateRow
rollouts.inspection.retained_selection.ProfileSelectionStateRow()Fields required to decide the primary-arm two-scene scale-floor gate.
1.1.6 RecordedSelectionContract
rollouts.inspection.retained_selection.RecordedSelectionContract(
producer_revision,
score_source,
selection_policy,
robust_temperature_logits,
branch_factor,
selection_temperature,
robust_logit_iqr_floor,
)Producer-bound admission for interpreting finite stored logits as a mask.
1.1.6.1 Attributes
| Name | Description |
|---|---|
| producer_revision | Exact clean producer commit whose _masked_softmax persisted masked logits. |
| score_source | Original selector score, required to be target_root_gain. |
| selection_policy | Required temperature_softmax policy; greedy records have different semantics. |
| robust_temperature_logits | Whether the producer applied the recorded median/IQR normalization. |
| branch_factor | One draw per factual step; additional draws require explicit lineage. |
| selection_temperature | Positive scalar for the recorded softmax and fixed-mask shadow. |
| robust_logit_iqr_floor | Nonnegative producer scale floor used before the recorded softmax. |
1.1.7 SelectionStateRow
rollouts.inspection.retained_selection.SelectionStateRow()One factual selector state with raw-score and final-draw distributions.
1.2 Functions
| Name | Description |
|---|---|
| exploratory_scene_bootstrap_95 | Return an exploratory percentile interval over physical-scene means. |
| paired_horizon_rows | Compare observed prefixes with exact root/target/replica intersections. |
| primary_scale_floor_gate | Require qualifying N60 states in at least two physical budget scenes. |
| producer_robust_temperature_logits | Recompute retained producer logits through the canonical replay owner. |
| recorded_selection_state_rows | Return one checked state row per factual selection draw. |
1.2.1 exploratory_scene_bootstrap_95
rollouts.inspection.retained_selection.exploratory_scene_bootstrap_95(
effects,
*,
seed=7,
resamples=4096,
)Return an exploratory percentile interval over physical-scene means.
effects maps each physical scene to its finite, pre-aggregated scalar summary, such as a mean paired effect or mean diagnostic accuracy. Callers own the estimand and aggregate targets/replicas within scenes before this boundary; candidate rows and acquisition steps are not independent units. Diagnostic accuracy is not a paired treatment effect.
Resample scenes equally with replacement resamples times using seed, then return the 2.5th and 97.5th percentiles of the resampled scene means. Defaults preserve 4096 draws with seed 7. Both parameters require integers excluding booleans; seed must be nonnegative and resamples strictly positive. Mapping insertion order determines the float64 observation array and is preserved rather than sorted here. Fewer than two scenes yields None; nonfinite effects or an interval unrepresentable in float64 are rejected without replacing observations.
Report the original scene summaries and scene count alongside this interval. It describes empirical resampling of the supplied, possibly selected scene population, without proving population coverage or generalization. A constant sample yields a degenerate interval, not zero population uncertainty. Very few scenes provide weak exploratory support; the interval is neither confirmatory inference nor a promotion gate.
1.2.2 paired_horizon_rows
rollouts.inspection.retained_selection.paired_horizon_rows(
units,
*,
contrasts,
horizons=(1, 2, 3, 5, 8, 12, 16),
)Compare observed prefixes with exact root/target/replica intersections.
horizon_specific changes its pair population at each horizon; h16_survivors fixes the exact matched H16 pair IDs at every prefix. Pair IDs include physical-root identity, preventing accidental scene-only matches. Horizons are unique integer prefix lengths in the producer’s supported range [1, 16]. Missing prefixes never become zero-gain outcomes.
1.2.3 primary_scale_floor_gate
rollouts.inspection.retained_selection.primary_scale_floor_gate(rows)Require qualifying N60 states in at least two physical budget scenes.
1.2.4 producer_robust_temperature_logits
rollouts.inspection.retained_selection.producer_robust_temperature_logits(
scores,
temperature,
iqr_floor=0.0,
)Recompute retained producer logits through the canonical replay owner.
scores is Tensor["N", float32/float64]. Its dtype, device, order and nonfinite-score NaN positions are preserved. Replay centers finite scores by their Torch median and divides by IQR (at least four scores) or population standard deviation, bounded below by dtype epsilon and the optional nonnegative iqr_floor. The exact operation order is (score - median) / (scale * temperature); dividing twice can round differently. No heading term or acquisition policy is introduced here.
Temperature must remain positive and finite in the score dtype; the finite nonnegative floor must lie within its range. A finite input score producing a nonfinite logit raises ValueError before inspection can turn it into a probability shadow. Empty/all-nonfinite populations return aligned NaNs, without inventing support. This admission adapter does not certify historical source identity; the consuming store inspection owns producer/configuration checks.
1.2.5 recorded_selection_state_rows
rollouts.inspection.retained_selection.recorded_selection_state_rows(
reader,
*,
contract,
)Return one checked state row per factual selection draw.
A row with unavailable or inconsistent recorded probabilities retains its identity and exclusion reason. A checked selection requires positive stored and reconstructed producer FP32 probability; finite eligible logits alone do not imply sampling support after underflow. Legacy float64 distribution diagnostics are preserved. The optional 0.005 floor is a probability shadow on the recorded final eligible set, never a replayed trajectory.