pub struct ExplanationBlock {
pub producer_node: NodeId,
pub method: String,
pub target_name: Option<String>,
pub payload: Value,
}Expand description
An EXPLAIN-phase output block (ADR-12 explain contract). Explanations are a
node output returned in the NodeResult — like predictions, they cross as
data, not as an opaque host handle. The payload shape is controller-defined
(e.g. per-feature importances); the core does not interpret it. Explanations
are only valid in the EXPLAIN phase.
Fields§
§producer_node: NodeIdNode whose model the explanation describes (must equal the producing node).
method: StringStable explanation method identifier, e.g. shap, permutation_importance.
target_name: Option<String>Optional target/output name the explanation pertains to.
payload: ValueController-defined explanation payload as canonical JSON.
Implementations§
Source§impl ExplanationBlock
impl ExplanationBlock
Sourcepub fn validate(&self) -> Result<(), DagMlError>
pub fn validate(&self) -> Result<(), DagMlError>
Validate the intrinsic shape of the explanation block (method/target_name
non-empty). Producer identity is checked against the node in
NodeResult::validate_for_task.
Trait Implementations§
Source§impl Clone for ExplanationBlock
impl Clone for ExplanationBlock
Source§fn clone(&self) -> ExplanationBlock
fn clone(&self) -> ExplanationBlock
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ExplanationBlock
impl Debug for ExplanationBlock
Source§impl<'de> Deserialize<'de> for ExplanationBlock
impl<'de> Deserialize<'de> for ExplanationBlock
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<ExplanationBlock, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<ExplanationBlock, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Source§impl PartialEq for ExplanationBlock
impl PartialEq for ExplanationBlock
Source§fn eq(&self, other: &ExplanationBlock) -> bool
fn eq(&self, other: &ExplanationBlock) -> bool
self and other values to be equal, and is used by ==.