import type { ShapeSupplyEntry, SplitRetention } from "#utils/retention"; import type { CountryHoldout, SplitName } from "#utils/split"; import type { EvaluationGroupPolicyIdentity } from "#utils/validation-groups"; /** * The module whose `splitForRow` the policy hash covers, repository-relative. */ export declare const SPLIT_POLICY_MODULE = "packages/corpus/lib/utils/split.ts"; /** * The attribute name a version manifest records as deciding `split`. */ export declare const SPLIT_ATTRIBUTE = "split"; /** * The attribute file of one stored parquet file. */ export interface SplitAttributeFile { attribute: typeof SPLIT_ATTRIBUTE; policyHash: string; policy: { holdouts: Record; codeHash: string; /** * The frozen and validation group lists the split applied, when it ran under that policy. */ evaluationGroups?: EvaluationGroupPolicyIdentity; }; /** * The parquet file the attribute describes, by name and sha256. */ file: { name: string; sha256: string; rows: number; }; counts: Record; /** * The held-out `source_id` values, sorted. * A row whose id neither list holds belongs to `train`. */ val: string[]; test: string[]; /** * The retention table applied, when one was registered (section 5.1). */ retention?: { floor: number; protectedShapes: number; }; } /** * The hash of one holdout policy: the holdout table and the code that applies it. * * A registered retention table joins the hashed payload, so a table change writes * a new attribute file rather than relabeling the old one. * The evaluation-group policy's two lists and its validation quota join it the same way. */ export declare function splitPolicyHash(holdouts: Record, retention?: SplitRetention, evaluationGroups?: EvaluationGroupPolicyIdentity): Promise<{ policyHash: string; codeHash: string; }>; /** * The attribute filename for a parquet file and a policy: `.split..json`. */ export declare function splitAttributeFilename(parquetName: string, policyHash: string): string; /** * The split one row belongs to under an attribute. */ export declare function splitOfSourceID(attribute: Pick, sourceID: string): SplitName; /** * Read a split attribute file. * * @throws When the file declares a different attribute or its held-out lists are missing. */ export declare function readSplitAttribute(path: string): Promise; /** * The attribute name a retention artifact declares. */ export declare const SPLIT_RETENTION_ATTRIBUTE = "split-retention"; /** * The retention artifact a supply pass writes beside a corpus manifest (section 5.1): the full * per-combination supply for the allocation report, and the combinations the split then keeps in training. */ export interface SplitRetentionFile { attribute: typeof SPLIT_RETENTION_ATTRIBUTE; /** * The minimum independent training groups a combination keeps after the holdout. */ floor: number; /** * The corpus the supply was measured on. */ corpusVersion: string; /** * The full country–shape supply table, sorted by country then shape. */ supply: ShapeSupplyEntry[]; /** * Keys of `shapeKeyOf` whose training remainder falls below `floor`, sorted. */ protectedShapes: string[]; } /** * Read a retention artifact into the lookup the split applies. * * @throws When the file declares a different attribute or its floor or lists are missing. */ export declare function readSplitRetention(path: string): Promise; //# sourceMappingURL=attribute.d.ts.map