typedefs
typedefs
¶
Source contracts and batch container types.
DatasetTaskConfig
¶
Bases: Protocol
Task fields required by dataset explanation sources.
DatasetExperimentConfig
¶
Bases: Protocol
Experiment fields required by dataset explanation sources.
DatasetRunnerConfig
¶
Bases: Protocol
Config fields required by dataset explanation sources.
ExplanationBatch
dataclass
¶
A model-ready observation window plus metadata for saving explanations.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
observation
|
ObservationBatch
|
Observation dictionary passed to the policy attribution functions. |
required |
actions
|
ActionBatch | None
|
Optional action dictionary from the source sample. Offline
dataset mode provides normalized/tokenized action targets when the
dataset contains them. Online inference mode sets this to |
required |
display_observation
|
dict[str, Tensor]
|
Camera tensors used for visual overlays. These are kept separate because dataset batches may contain extra tokenized observation keys that are not displayable. |
required |
metadata
|
dict[str, ExplanationMetadataValue]
|
Lightweight source metadata used for output filenames and reports. |
required |
preprocess_observation
|
bool
|
Whether the explainer should run policy normalization/tokenization before attribution. |
required |
ExplanationBatchConsumer
¶
Bases: Protocol
Consumes explanation batches produced by online inference hooks.