1 lightning.finite_horizon.scene_sampler
lightning.finite_horizon.scene_sampler
Frozen scene-balanced whole-chain exposure for prospective Q1 experiments.
Sampling balances physical scenes, not correlated tasks or states. Within each scene the admitted chains form a seeded cyclic roster. A complete schedule is sealed before training; epochs denote recovery blocks, never corpus passes.
1.1 Classes
| Name | Description |
|---|---|
| QhSceneBalancedSampler | Expose an immutable finite schedule through native Torch sampling. |
| QhSceneSamplingConfig | Declare finite TRAIN-only exposure; module seed controls every draw. |
| QhSceneSamplingReceipt | Detached JSON-compatible TRAIN schedule and seal returned after construction. |
| QhSceneSamplingRow | Root/task-qualified identity of one admitted TRAIN chain position. |
1.1.1 QhSceneBalancedSampler
lightning.finite_horizon.scene_sampler.QhSceneBalancedSampler(
rows,
*,
config,
seed,
corpus_identity_hash,
)Expose an immutable finite schedule through native Torch sampling.
Scene order depends only on seed and sorted scene IDs, so adding chains to the same scenes preserves paired physical-scene exposure. Chain traversal depends on qualified identity within each scene. Admission rejects schedules that cannot visit every TRAIN chain. set_epoch reproduces whole-block recovery; mid-block exact continuation is outside this contract.
1.1.1.1 Attributes
| Name | Description |
|---|---|
| receipt | Return a detached JSON-compatible seal of identities and all draws. |
| epoch | Return the current frozen draw block for read-only acquisition audit. |
1.1.1.2 Methods
| Name | Description |
|---|---|
| set_epoch | Select a declared recovery block, rejecting over-budget exposure. |
1.1.1.2.1 set_epoch
lightning.finite_horizon.scene_sampler.QhSceneBalancedSampler.set_epoch(epoch)Select a declared recovery block, rejecting over-budget exposure.
1.1.2 QhSceneSamplingConfig
lightning.finite_horizon.scene_sampler.QhSceneSamplingConfig()Declare finite TRAIN-only exposure; module seed controls every draw.
1.1.2.1 Attributes
| Name | Description |
|---|---|
| protocol | Closed whole-chain sampling identity; default training remains unchanged. |
| blocks | Number of complete validation/recovery blocks in the frozen schedule. |
| draws_per_block | Chain presentations per block; must divide exactly into training batches. |
1.1.3 QhSceneSamplingReceipt
lightning.finite_horizon.scene_sampler.QhSceneSamplingReceipt()Detached JSON-compatible TRAIN schedule and seal returned after construction.
The sampler validates unique qualified rows and full schedule coverage; diagnostic-history admission independently replays persisted receipts. An annotation alone does not authenticate a decoded JSON payload.
1.1.3.1 Attributes
| Name | Description |
|---|---|
| schedule_hash | Stable hash of all schedule fields before this hash field is appended. |
1.1.4 QhSceneSamplingRow
lightning.finite_horizon.scene_sampler.QhSceneSamplingRow(
scene_id,
source_manifest_hash,
source_sample_index,
target_task_identity,
store_index,
rollout_row_id,
)Root/task-qualified identity of one admitted TRAIN chain position.
1.1.4.1 Attributes
| Name | Description |
|---|---|
| scene_id | Physical scene used as the independent exposure and evaluation unit. |
| source_manifest_hash | Immutable actor-root manifest binding; separate from rollout origin. |
| source_sample_index | Persisted actor source-row index within the bound root manifest. |
| target_task_identity | Source-qualified target geometry identity; repeated tasks retain distinct chains. |
| store_index | Position in the frozen ordered rollout-store population. |
| rollout_row_id | Native factual chain row within its immutable rollout store. |