pub struct ExplanationBlock {
pub producer_node: NodeId,
pub producer_port: Option<String>,
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).
producer_port: Option<String>§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<()>
pub fn validate(&self) -> Result<()>
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 more