1 rollouts.storage.validation

rollouts.storage.validation

Standalone Zarr replay store for finite-candidate rollout traces.

This module owns corruption detection for the persisted contract. A store contains compact row tables for rollout chains, steps, full-shell candidates, shared VIN source rows, lineage, target records, masks, and reason codes. The padded Q_H tensors used by finite-candidate value learning are persisted in a derived q_h/ group for high-throughput training and are validated against the canonical factual steps/ and candidates/ tables. The store deliberately does not mutate or migrate the strict VIN offline store; rollout replay is a separate artifact with source manifest, split, target, candidate-mixture, policy, and oracle config hashes.

q_train_mask is true only when a candidate row is actor-selectable, target-valid, GT-label-valid, and has a finite target-root-gain reward. Invalid candidates keep their full-shell row but carry false masks and NaN labels. Q_H padding exists only in the derived dense q_h/ view. Target RRI and scene RRI are state-relative diagnostics; target labels must not be silently filled from scene scores or low-quality invalid rows.

1.1 Classes

Name Description
RolloutZarrValidationResult Validation summary for a rollout Zarr store.

1.1.1 RolloutZarrValidationResult

rollouts.storage.validation.RolloutZarrValidationResult(
    store_dir,
    num_rollouts,
    num_steps,
    num_candidates,
    errors=list(),
)

Validation summary for a rollout Zarr store.

errors contains schema, linkage, mask, and lineage violations. Validation fails if candidate strategy ids, mixture ids, target protocol metadata, source hashes, or explicit target-root-gain rewards are missing.

1.1.1.1 Attributes

Name Description
store_dir Resolved rollout-store directory checked in read-only mode.
num_rollouts Validated number of normalized rollout rows.
num_steps Validated number of normalized step/state rows.
num_candidates Validated number of full-shell candidate rows.
errors All discovered schema, linkage, mask, label, and provenance violations.
ok Return True when no validation errors were found.

1.2 Functions

Name Description
validate_rollout_zarr_store Validate a rollout store, optionally omitting unconsumed selected-depth rows.

1.2.1 validate_rollout_zarr_store

rollouts.storage.validation.validate_rollout_zarr_store(
    store_dir,
    *,
    validate_selected_depth_payload=True,
)

Validate a rollout store, optionally omitting unconsumed selected-depth rows.

Back to top