betting_combat.features.inround_blocks
inround_blocks — features.inround_blocks: THE IN-ROUND TABLE (Sam 2026-11-18): every fight since 2015 x round
x 30-second block, the breaks included - what happened in each block, as Cito’s live feed shows it. The base the
in-round rows are built from (the next step adds each block’s prices to it).
InroundBlocksTable NAME inround_blocks, KEY (bout_id, round, block, draw), DATE dateThe grid, for each round of the fight up to its last:
block -2, -1 the break before the round’s bell (-1 its last 30 s, -2 the rest; round 1: the minute before
the first bell), phase ‘break’: no fight goes on in it - its counts are what the live feed
posted in it, its corrections to the round just fought (Cito, 11-18: in a fifth of fighter-
rounds, +0.3 sig strikes and +0.6 s control a fighter-round on average); 0 where it posted none
block 0 .. the round while it is on, 30 s a block, phase ‘round’; the fight’s last round stops at its
official finish second (its last block partial); nothing after the fight’s end
The fights: the cards we trade (numbered cards and Fight Nights, as features.fight; not the Contender Series nor Road
to UFC).
Each row is one draw:
0 the live feed itself (source ‘live’), on the rounds Cito read: features.fight_blocks as it is
(a block no reading came in: readings 0, its counts blank - the next reading’s block holds them),
its breaks from the feed’s readings between the rounds (stats_simulator.break_readings)
1 the simulators’ (source ‘sim’), every round since SINCE with official totals: drawn from its
totals and how it ended, as the live feed would have shown it, the break after it with it
(models.stats_simulator), and its prices (models.block_price_simulator)
OUT OF SAMPLE (Sam 2026-11-19, models.folds): a simulated row’s stats and prices each come from a fit that never saw its
card - stats_src / price_src ‘oos’ (a training card: the fit that held it out, stats_fold / price_fold
the card; a new card: the saved model, ‘saved:build makes every simulated row so (refresh: the three simulators in
order, through the guard).
A round’s blocks and the break before the next add up to what the live feed showed of it at the next bell.
Columns: the key; source, phase; event_id, date, fighter_a_id, fighter_b_id; block_s (its start in the round: -60 / -30 in the break), fight_s (the fight’s clock at its start: a break holds the clock at its bell); readings; a_* / b_* (A’s and B’s 22 counts in the block); sim_version (the simulator that drew the sim rows). The prices (with a BlockPriceSimulator): per market (winner = fighter A wins, distance, finish_round = it ends in this round, ko = it ends by KO / TKO / DQ) {m}_p (the walk’s price: winner / distance / ko about the mid, finish_round the YES bid), {m}_bid, {m}ask at the block’s end - draw 0 Kalshi’s real ones (the same block of the same clock), the sim draws the BlockPriceSimulator’s (walked on that draw’s stats from PriceSimulator’s bells); on draw 0 also poly{m}p (Polymarket’s last print, else its last minute) and polyus{m}_bid / _ask / _p (Polymarket US’s quote); price_version. A finished fight’s last block: no simulated price (the fight ends in it). What happened in the block only: nothing thus far (the feature layer’s).
Seeded: the same rounds draw the same; a refit, a corrected round or a fight filled in before others redraws.
GUARD: the sim draws come from the official totals and the ending - the rows in-round rules train on for history, judged on draw 0 (the live feed); never an outcome model’s input as if known before the round ended.
Classes
InroundBlocksTable
Bases: FeatureTable
features.inround_blocks: fight x round x block x draw, the breaks included (module doc).
build
build(db: DBClient, base: Base | None = None) -> dict[str, int]Every row (the base is not read: the inputs are the simulator’s); a fight no longer in it removed.
compute
compute(base: Base | None = None) -> pd.DataFramedraws 0: the live feed’s draw alone (no simulator: the card run’s live blocks, live.blocks).
prune
prune(db: DBClient, rows: pd.DataFrame) -> NoneRemove the stored fights not in rows (a whole build’s: the table is exactly its fights).
update
update(db: DBClient, since: Any, base: Base | None = None) -> dict[str, int]The fights dated since on.
write
write(db: DBClient, rows: pd.DataFrame) -> dict[str, int]Functions
bells_from_prices
bells_from_prices(T: pd.DataFrame, draw: int = 1) -> pd.DataFrameThe block prices’ bells from features.prices’ one simulated draw ({m}_draw_bid / _ask: out of sample on the
quoted cards, forecast elsewhere - the same fits as the row’s level): bell_prices’ frame, draw.
build
build(db: DBClient, n_jobs: int = 4, score_draws: int = 0, report: dict[str, Any] | None = None) -> dict[str, Any]THE BUILD of the block simulations (Sam 11-19, models.folds), through the guard; after the PriceSimulator’s
(models.price_simulator.refresh: features.prices - the round starts’ levels and one bid / ask draw, out of sample on
every quoted card, forecast by the final fit elsewhere - read here as the bells):
2 StatsSimulator: every Cito card’s rounds drawn by a fit on the other cards, every other round since 2015 by the final
fit (gated, saved)
3 BlockPriceSimulator: every card with market blocks walked by a fit on the other cards (from that card’s own bells and
stats - out of sample themselves), every other round by the final fit (gated, saved)
4 features.inround_blocks (draw 0 the real feed and quotes, draw 1 the simulators’) and features.inround_labels.
score_draws / report: research - the Cito cards drawn that many times out of sample (the table keeps the first
DRAWS) and every frame handed back in report for scoring.
refresh
refresh(db: DBClient, since: Any | None = None) -> dict[str, Any]The job’s in-round step: since None - the whole build (build); else step 6 on the new cards (update).
update
update(db: DBClient, n_jobs: int = 1) -> dict[str, Any]STEP 6 after a card (models.folds; after the PriceSimulator’s own, models.price_simulator.update), each simulator in
order: its saved model draws the cards it never learned from -
a card with real data out of sample (fold ‘saved: