Skip to content

betting_combat.features.live_final

live_final — features.final’s row for a card’s fight at a live break (Sam 2026-11-16), built by the table’s own functions so a live row is what the build would have stored for it.

LiveFinal one card. ``read`` (once, before the first bell): the card's fights' break-0 rows,
everything they need that is known before the fight (``final.prepare``: each
fighter's history, round-k and through-k typicals, the division's rates, the
fight-level blocks, the books), the build's fill table (``features.final_fills``)
and the round model the outcomes' lines call comes from. ``at_break(bout, k,
lines)``: the row of break k from the lines of rounds 1..k as Cito had them at
round k's bell (``live.bell_stats.BreakLines.lines``)
round_rows the lines to fighter_stats' round rows: both fighters' counts each way, the
derived counts, the seconds, the lines' call (``outcomes.lines_call``: the chance
a judge gives him the round, a 10-8 each way)

The training rows map the official count of the round just fought to what live shows at the bell (inplay.LIVE_VIEW_1113); live, the lines are what live shows, so the view is the identity. With the official lines and the training view, at_break gives the stored row (the parity check: data/ufc/cito/assess/final_v1/m22_live_rows.py).

Classes

LiveFinal

One card’s live rows (module doc).

at_break

at_break(bout_id: str, k: int, rounds: pd.DataFrame | None = None) -> pd.DataFrame

The fight’s row at break k (0: the first bell), filled as the build fills: rounds its round rows through round k (round_rows; none at break 0).

fight

fight(bout_id: str) -> pd.Series

prepare

prepare(inp: FinalInputs, bouts: list[str] | set[str], fills: pd.DataFrame, model: RoundModel | None, start: pd.Timestamp = START, view: LiveView | None = None) -> LiveFinal

The card’s precompute from the tables’ inputs (FinalInputs): bouts its fights (scheduled).

read

read(db: DBClient, bouts: list[str] | set[str]) -> LiveFinal

The card’s precompute from the database: the inputs, the base (the round model; the book table recomputed from the odds as they stand now - the card run refreshes them first, feeds.runner.refresh_card_odds - so the card’s lines are their close as training has them, not the last build’s), the fills.

round_rows

round_rows(bout_id: str, lines: dict[str, dict[int, dict[str, Any]]]) -> pd.DataFrame

Functions

round_rows

round_rows(bout_id: str, fighter_a_id: str, fighter_b_id: str, date: pd.Timestamp, lines: dict[str, dict[int, dict[str, Any]]], model: RoundModel | None) -> pd.DataFrame

fighter_stats’ round rows of one fight from its lines (fighter id -> round -> counts by the base’s names, feeds.fight_data.LINE_FIELDS): bout_id, fighter_id, round, LINE_SUMS, lines_p, lines_10_8. A round both fighters’ lines hold is a full five minutes (a break follows it); a round missing a count has no lines (counts blank, no call), as the build has it.