Diagnostic presets¶
This section documents predefined diagnostic configurations provided by eb-evaluation.
Presets bundle common combinations of diagnostics for standardized evaluation workflows.
eb_evaluation.diagnostics.presets
¶
Governance presets for Electric Barometer diagnostics.
This module defines small, named bundles of governance thresholds that represent policy stances (not model tuning). Presets are intended to be:
- stable and versionable (e.g., referenced in notebooks, configs, and reports),
- auditable (explicit thresholds, no hidden behavior),
- lightweight (pure configuration; no computation).
Presets are consumed by stable entrypoints such as validate_governance to standardize downstream behavior without requiring callers to hand-wire thresholds on every invocation.
GovernancePreset
dataclass
¶
Named bundle of governance thresholds.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str
|
Stable preset identifier (e.g., "conservative", "balanced", "aggressive"). |
required |
description
|
str
|
Short human-readable summary of the policy stance. |
required |
dqc
|
DQCThresholds
|
Thresholds governing Demand Quantization Compatibility (DQC). |
required |
fpc
|
FPCThresholds
|
Thresholds governing Forecast Primitive Compatibility (FPC). |
required |
get_governance_preset(name)
¶
Retrieve a governance preset by name.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str
|
Preset name. One of {"conservative", "balanced", "aggressive"}. |
required |
Returns:
| Type | Description |
|---|---|
GovernancePreset
|
The corresponding preset. |
Raises:
| Type | Description |
|---|---|
KeyError
|
If the preset name is unknown. |
preset_thresholds(preset)
¶
Resolve a preset into (DQCThresholds, FPCThresholds).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
preset
|
str | GovernancePreset
|
Either a preset name ("conservative" | "balanced" | "aggressive") or an explicit GovernancePreset instance. |
required |
Returns:
| Type | Description |
|---|---|
(DQCThresholds, FPCThresholds)
|
Threshold objects suitable for passing to validate_governance / decide_governance. |
Raises:
| Type | Description |
|---|---|
TypeError
|
If |
ValueError
|
If |