1 datasets.bundles.readiness
datasets.bundles.readiness
Finite-horizon dataset admission and batch preview orchestration.
1.1 Classes
| Name | Description |
|---|---|
| NormalizedStorageMetric | One storage total normalized by an explicit factual denominator. |
| QhBatchPreview | Bounded evidence from one selected chain and one actual DataLoader batch. |
| QhCorpusReadiness | Actual Q_H dataset and DataModule admission evidence for one bundle. |
| QhPreviewRequest | Complete immutable request for one bounded Q_H chain/batch preview. |
| QhReadinessContract | Named Q_H actor/data contract required by readiness inspection. |
| QhReadinessRequest | Complete immutable request for one Q_H corpus-readiness acquisition. |
| QhStageReadiness | Materialized readiness facts for one learning stage. |
1.1.1 NormalizedStorageMetric
datasets.bundles.readiness.NormalizedStorageMetric(
name,
value,
numerator_bytes,
denominator,
unit,
reason,
)One storage total normalized by an explicit factual denominator.
1.1.1.1 Attributes
| Name | Description |
|---|---|
| name | Stable metric name. |
| value | Bytes per denominator row, or None when unavailable. |
| numerator_bytes | Persisted storage byte total used by the ratio. |
| denominator | Factual row count used by the ratio. |
| unit | Human-readable ratio unit. |
| reason | Why the ratio is unavailable, otherwise None. |
1.1.2 QhBatchPreview
datasets.bundles.readiness.QhBatchPreview(
stage,
selected_chain_index,
selected_chain_key,
selected_chain_steps,
batch_chain_keys,
batch_step_counts,
shapes,
dtypes,
step_padding_count,
candidate_padding_count,
action_count,
trainable_candidate_count,
)Bounded evidence from one selected chain and one actual DataLoader batch.
1.1.2.1 Attributes
| Name | Description |
|---|---|
| stage | Stage whose dataset and loader were sampled. |
| selected_chain_index | Requested zero-based dataset index. |
| selected_chain_key | CPU-only source identity for the directly read chain. |
| selected_chain_steps | Realized state count in the directly read chain. |
| batch_chain_keys | CPU-only identities collated by the actual DataLoader. |
| batch_step_counts | Realized chain lengths before time-axis padding. |
| shapes | Principal actor and supervision tensor shapes. |
| dtypes | Principal actor and supervision tensor dtypes. |
| step_padding_count | False entries in the batch step mask. |
| candidate_padding_count | False entries in the materialized-candidate mask. |
| action_count | Actor-valid candidate entries in the batch. |
| trainable_candidate_count | Persisted label-supported candidate entries in the batch. |
1.1.2.2 Methods
| Name | Description |
|---|---|
| to_jsonable | Return JSON-compatible chain and collation evidence. |
1.1.2.2.1 to_jsonable
datasets.bundles.readiness.QhBatchPreview.to_jsonable()Return JSON-compatible chain and collation evidence.
1.1.3 QhCorpusReadiness
datasets.bundles.readiness.QhCorpusReadiness(
selection,
verdict,
blockers,
stages,
contract,
actor_contract,
loader_settings,
scene_disjoint,
storage,
)Actual Q_H dataset and DataModule admission evidence for one bundle.
1.1.3.1 Attributes
| Name | Description |
|---|---|
| selection | Normalized VIN root and rollout-store selection. |
| verdict | Whether the selected stores construct one admitted DataModule. |
| blockers | Exact fail-closed construction or validation errors. |
| stages | Train, validation, and test rows in stable order. |
| contract | Homogeneous horizon-independent Q_H data contract. |
| actor_contract | Exact named actor contract used to construct every stage. |
| loader_settings | Deterministic DataLoader settings used for admission and preview. |
| scene_disjoint | Whether configured stage scene sets passed pairwise disjointness checks. |
| storage | Persisted bytes normalized by physical and Q_H factual denominators. |
1.1.3.2 Methods
| Name | Description |
|---|---|
| to_jsonable | Return presentation-neutral readiness evidence. |
1.1.3.2.1 to_jsonable
datasets.bundles.readiness.QhCorpusReadiness.to_jsonable()Return presentation-neutral readiness evidence.
1.1.4 QhPreviewRequest
datasets.bundles.readiness.QhPreviewRequest(
readiness,
stage=Stage.TRAIN,
chain_index=0,
)Complete immutable request for one bounded Q_H chain/batch preview.
1.1.4.1 Methods
| Name | Description |
|---|---|
| digest | Return the complete deterministic retained-state and cache identity. |
1.1.4.1.1 digest
datasets.bundles.readiness.QhPreviewRequest.digest()Return the complete deterministic retained-state and cache identity.
1.1.5 QhReadinessContract
datasets.bundles.readiness.QhReadinessContract(
experiment_profile,
root_evl_profile,
selected_observation_protocol,
objective_profile='qh_dense_valid_fitted_q_v1',
)Named Q_H actor/data contract required by readiness inspection.
1.1.5.1 Attributes
| Name | Description |
|---|---|
| experiment_profile | Closed experiment role, never inferred from a diagnostic default. |
| root_evl_profile | Root EVL profile bound to the actor store. |
| selected_observation_protocol | Selected-observation source bound to the actor contract. |
| objective_profile | Population-independent fitted-Q objective used for admission and preview. |
1.1.6 QhReadinessRequest
datasets.bundles.readiness.QhReadinessRequest(
selection,
generation,
contract,
batch_size=1,
seed=0,
scene_split=None,
)Complete immutable request for one Q_H corpus-readiness acquisition.
This is deliberately the cache-key boundary: the selected bundle, its replacement-sensitive generation, the named scientific contract, and every loader control which can affect the result travel together.
1.1.6.1 Attributes
| Name | Description |
|---|---|
| scene_split | External frozen stage assignment; None preserves persisted split filtering. |
1.1.6.2 Methods
| Name | Description |
|---|---|
| digest | Return the complete deterministic retained-state and cache identity. |
1.1.6.2.1 digest
datasets.bundles.readiness.QhReadinessRequest.digest()Return the complete deterministic retained-state and cache identity.
1.1.7 QhStageReadiness
datasets.bundles.readiness.QhStageReadiness(
stage,
included,
chain_count,
state_count,
trainable_candidate_count,
scene_ids,
max_horizon,
provenance,
)Materialized readiness facts for one learning stage.
1.1.7.1 Attributes
| Name | Description |
|---|---|
| stage | Campaign/learning split represented by this row. |
| included | Whether the stage contains chains and is configured in the DataModule. |
| chain_count | Number of complete factual rollout chains. |
| state_count | Number of realized candidate-bearing states across the stage. |
| trainable_candidate_count | Number of candidates admitted by the persisted Q_H label mask. |
| scene_ids | Ordered scene identities admitted by the stage dataset. |
| max_horizon | Largest realized chain length in the stage. |
| provenance | Actor and rollout identities reported by the validated dataset. |
1.2 Functions
| Name | Description |
|---|---|
| build_qh_corpus_readiness | Construct and inspect the real stage datasets and Q_H DataModule. |
| inspect_qh_preview | Acquire one preview for a complete, generation-bound request. |
| inspect_qh_readiness | Acquire Q_H readiness for one complete, generation-bound request. |
| preview_qh_batch | Read one selected chain and collate one batch through the real loader. |
1.2.1 build_qh_corpus_readiness
datasets.bundles.readiness.build_qh_corpus_readiness(
selection,
*,
contract,
batch_size=1,
seed=0,
scene_split=None,
)Construct and inspect the real stage datasets and Q_H DataModule.
The call is intentionally explicit and potentially expensive: it validates selected stores, joins every admitted rollout source to the immutable VIN actor store, scans factual chains for realized support counts, and then crosses the production DataModule admission seam. It never creates a model, Trainer, writer, or mutable store handle.
1.2.2 inspect_qh_preview
datasets.bundles.readiness.inspect_qh_preview(request)Acquire one preview for a complete, generation-bound request.
1.2.3 inspect_qh_readiness
datasets.bundles.readiness.inspect_qh_readiness(request)Acquire Q_H readiness for one complete, generation-bound request.
1.2.4 preview_qh_batch
datasets.bundles.readiness.preview_qh_batch(
selection,
*,
contract,
stage=Stage.TRAIN,
chain_index=0,
batch_size=1,
seed=0,
scene_split=None,
)Read one selected chain and collate one batch through the real loader.