ump_spec.rules.ladder
module ump-spec
Fallback ladder (spec §8) and the tier x operation matrix.
Classes
Section titled “Classes”LadderDecision
Section titled “LadderDecision”class
class LadderDecisionFields
| Name | Type | Default | Description |
|---|---|---|---|
step | str | ||
index | int | ||
warned | bool | ||
reason | str | ||
skipped | list[str] | field(default_factory=list) | |
notes | list[Note] | field(default_factory=list) |
Methods and properties (1)
init constructor
LadderDecision( self, step: str, index: int, warned: bool, reason: str, skipped: list[str] = list(), notes: list[Note] = list(),) -> NoneSource: packages/ump-spec/src/ump_spec/rules/ladder.py, line 39
Functions
Section titled “Functions”tier_supports
Section titled “tier_supports”function
def tier_supports(tier: str, op: str) -> strSource: packages/ump-spec/src/ump_spec/rules/ladder.py, line 35
ladder_index
Section titled “ladder_index”function
def ladder_index(step: str) -> intSource: packages/ump-spec/src/ump_spec/rules/ladder.py, line 49
choose_ladder_step
Section titled “choose_ladder_step”function
def choose_ladder_step( available: Iterable[str], *, excluded: Iterable[str] = (), benchmarks_available: bool = True,) -> LadderDecisionPick the highest rung available. available holds ladder steps or tiers (A/B/C/D/X).
excluded removes rungs (e.g. a model that failed the acceptance bar, G-ACC-01).
Source: packages/ump-spec/src/ump_spec/rules/ladder.py, line 53
Constants
Section titled “Constants”| Name | Type | Value | Description |
|---|---|---|---|
LADDER | tuple[str, ...] | ('full_model', 'curve_params', 'spend_table', 'summary', 'benchmarks', 'not_a... | 1 full model, 2 curve params, 3 spend table, 4 summary (warned), 5 benchmarks (warned), 6 not available. |
WARNED_STEPS | frozenset[str] | frozenset({'summary', 'benchmarks'}) | |
TIER_TO_STEP | dict[str, str] | {'A': 'full_model', 'X': 'full_model', 'B': 'curve_params', 'C': 'spend_table... | |
TIER_OPS | dict[str, dict[str, str]] | {'score': {'A': 'yes', 'B': 'yes', 'C': 'inside_grid_else_extrapolated_widene... | Spec §8 tier x operation matrix. |