betting_combat.store.rounds_dashboards
Strategy 4 (rounds) diagnostics in monitoring.betting_combat: the tables its three
dashboards read beside the shared ones, and the reads of the views over them.
The contract (who writes what, every column’s meaning) is ROUND_SYSTEM_FLOW.md §9; the DDL
is Part 3 of sql/betting_combat_monitoring.sql and the column lists below mirror it.
per model version rounds_refit_metrics (one row), rounds_calibration, rounds_feature_importance, rounds_layer2_folds, rounds_cpcv_paths (the weekly refit; ``replace_version`` rewrites one version's rows)per card rounds_decisions (the card run: one row per decision x market), rounds_card_limits (the card run: the money settings, when they change), rounds_forward_check (the forward job: live vs research replay)over time rounds_health_series (the daily health job), rounds_cusum_anchors (Sam: where the edge CUSUM starts monitoring)Shaping the rows is services.rounds_dashboards; this module only moves them.
Classes
RoundsDashboardStore
bets
bets(mode: str, league: str = 'ufc', card_date: dt.date | None = None) -> list[dict[str, Any]]Every bet (decision x market with a fill) of one mode, oldest first.
calibration
calibration(version: int, rows: Sequence[dict[str, Any]], source: str = 'oos') -> NoneOne version’s reliability bins of one source (‘oos’: the refit’s; ‘forward’: the forward job’s), replaced whole; the other source’s rows are kept.
card_bets
card_bets(card_id: str) -> list[dict[str, Any]]Every bet of a card (rounds_bets: units held and staked).
card_bootstrap
card_bootstrap(mode: str, league: str = 'ufc', n_boot: int = 2000, seed: int = 1) -> dict[str, Any] | NoneMean card P&L and pooled ROI with their 5-95 % card-bootstrap intervals.
card_decisions
card_decisions(card_id: str) -> list[dict[str, Any]]Every rounds decision row of a card (all modes), oldest first.
card_exposure
card_exposure(card_id: str, mode: str) -> list[dict[str, Any]]card_limits
card_limits(rows: Sequence[dict[str, Any]]) -> Nonecard_limits_latest
card_limits_latest(card_id: str) -> list[dict[str, Any]]The last money settings a card ran under, per mode (rounds_card_limits).
card_orders
card_orders(card_id: str) -> list[dict[str, Any]]Every rounds order of a card with its instrument (rounds_orders).
card_pnl
card_pnl(mode: str, league: str = 'ufc') -> list[dict[str, Any]]Settled P&L per card with the running totals and drawdown, oldest first.
checked_decisions
checked_decisions(versions: Sequence[int], league: str = 'ufc') -> list[dict[str, Any]]Every rounds decision row naming one of versions on a card the forward job has
checked (any rounds_forward_check row), oldest first.
cpcv_paths
cpcv_paths(version: int, rows: Sequence[dict[str, Any]]) -> Nonecusum_anchor
cusum_anchor(league: str, mode: str, anchor_at: dt.datetime, set_by: str | None = None, notes: str | None = None) -> NoneStart the edge CUSUM afresh for bets settled at or after anchor_at (Sam’s
control: after a model change, or once an alarm has been looked into).
cusum_anchors
cusum_anchors(league: str = 'ufc') -> list[dict[str, Any]]Every edge-CUSUM anchor (mode, anchor_at) of a league, oldest first.
decision_cards
decision_cards(league: str = 'ufc') -> list[dict[str, Any]]Every card with a rounds decision: card id and date.
decisions
decisions(rows: Sequence[dict[str, Any]]) -> Noneedge_cusum
edge_cusum(mode: str, league: str = 'ufc') -> list[dict[str, Any]]The edge CUSUM over the settled bets, in settlement order.
edge_cusum_rows
edge_cusum_rows(league: str = 'ufc') -> list[dict[str, Any]]The edge CUSUM of every mode, in settlement order within each segment.
feature_importance
feature_importance(version: int, rows: Sequence[dict[str, Any]]) -> Noneforward_cards
forward_cards(league: str = 'ufc') -> list[dict[str, Any]]Every card with a forward check: its card id and when it was last checked.
forward_check
forward_check(rows: Sequence[dict[str, Any]]) -> Noneforward_check_rows
forward_check_rows(card_id: str, mode: str | None = None) -> list[dict[str, Any]]health_points
health_points(series: str, since: dt.datetime) -> list[dict[str, Any]]health_series
health_series(rows: Sequence[dict[str, Any]]) -> Noneimportance_change
importance_change(version: int, model: str, method: str, top: int | None = None) -> list[dict[str, Any]]One version’s importances by rank, each next to the previous version’s.
layer2_folds
layer2_folds(version: int, rows: Sequence[dict[str, Any]]) -> Nonerefit_metrics
refit_metrics(row: dict[str, Any]) -> Nonereplace_forward
replace_forward(card_id: str, mode: str, rows: Sequence[dict[str, Any]]) -> NoneOne card’s forward check for one mode, exactly: in ONE transaction the card and mode’s old rows go and these land (a re-run never keeps a bet the replay no longer has; a failed write leaves the old rows).
replace_version
replace_version(table: str, version: int, rows: Sequence[dict[str, Any]], source: str | None = None) -> NoneOne model version’s rows of a per-version table, exactly: in ONE transaction the
version’s old rows go and these land (a re-run never leaves a feature or bin the new
fit no longer has; a failed write leaves the old rows as they were). source
(rounds_calibration only): just that source’s rows are replaced.
versions
versions(league: str = 'ufc') -> list[dict[str, Any]]Every refit, newest first, with its registry status (model_registry).
write
write(table: str, rows: Sequence[dict[str, Any]]) -> NoneUpsert rows on the table’s key.
Functions
shape
shape(table: str, rows: Sequence[dict[str, Any]]) -> list[dict[str, Any]]Exactly the table’s columns (unknown ones refused, the key required, a missing value left NULL), integers as int and the rest of the numbers as float (numpy scalars included).