factor_agent.gate#
The Gate: deterministic checks that every candidate passes before it is evaluated.
Gate.check never reads data; what candidates may write with is its
Vocabulary, from the campaign’s field and operator files. A bad candidate comes back Rejected
with readable reasons; only an infrastructure failure raises. The checks
run in this order:
static checks on the code (syntax allow-list, names in the vocabulary,
alphaassigned);the graph build in a sandboxed subprocess (timeout from when the sandbox is ready, memory limit, bubblewrap filesystem isolation where it is installed);
the stage rules of an intraday family’s candidate (
stages.split): an intraday field reaches the daily stage only through a session aggregation, the intraday stage reads no daily field, no aggregation of a daily value or of an aggregation, each operator is used only in its stages, each window and lag is one of its stage’s set; each refusal says how to write it instead (Rejected.hints);the graph’s size, parameter values, dimensions and complexity, all reported together;
originality against the zoo: not a rewrite of a zoo factor, not one with other windows or parameters only, and no common subtree with one larger than the limit. The reasons name the zoo factor and quote the subtree;
not a duplicate of a candidate this gate passed before: the same canonical graph up to what keeps or reverses its ranking (
Graph.ranking): a factor and its negation predict alike, in opposite directions.
Classes
Check candidates; see the module docstring for the order of the checks. |
|
A candidate whose graph was built: the graph, its fingerprint and its statistics. |
|
A candidate refused by the gate, with the reasons sent back to the proposer. |
Modules
A candidate's KunQuant graph as plain data: what the Gate records and the Evaluator compiles. |
|
The stage split: a candidate's recorded graph as the graphs it runs as, and the stage rules it breaks. |
|
The Vocabulary: the fields, operators and parameter values a campaign's candidates may write with. |