betting_combat.rounds.live.artifact
The weekly refit’s product as one model version: every locked model the live decision
needs, stored in model_versions.params (strategy rounds).
models ``training.LockedModels``: layer 1, layer 2, meta, locked on the cards before the cutoff (``training.fit_locked``)clock the card year's Group 5 models (``features.ClockYear``), for the upcoming rowsfills the training Set 3's dataset-wide fills (``live.windows.Fills``)groups layer 2's feature groups (the columns a live row must carry)The fitted objects are scikit-learn / LightGBM / NumPy objects, so the version holds them pickled (zlib-compressed, base64) with a SHA-256 of the bytes and the library versions they were fitted under. Loading refuses a blob whose hash does not match, or whose libraries differ from the running ones (a pickle is only trusted by the same code that wrote it): the strategy then has no model and does not trade. The blob is only ever written by the refit job into our own database.
Classes
ArtifactError
Bases: RuntimeError
A stored version that cannot be trusted or used: the strategy does not trade.
RoundsArtifact
from_params
from_params(params: dict[str, Any], check_libraries: bool = True) -> RoundsArtifactThe version back, or ArtifactError (wrong format, damaged blob, different
libraries).
to_params
to_params() -> dict[str, Any]The JSON-able model_versions.params of this version.
Functions
library_versions
library_versions() -> dict[str, str]The running Python and the libraries a pickled model depends on.