import { type PathBuilderLike } from "path-ts"; import type { SourceRightsRecord } from "#source-register/corpus-inputs"; import { type TrainingAdmissionInputs } from "#training/config/admission"; import { RESOLVED_TRAINING_CONFIG_VERSION, type TrainingConfig } from "#training/config/schema"; /** * The versioned resolved config: every default applied and the admission result embedded. */ export interface ResolvedTrainingConfigDocument { schema_version: typeof RESOLVED_TRAINING_CONFIG_VERSION; /** * The YAML file the config was read from, absolute. */ config_path: string; config_sha256: string; config: TrainingConfig; /** * Values the Python loader computes from the config where a caller asks for them. */ derived: { admitted_sources: string[]; corpus_version: string; csv_log_path: string; }; source_rights: SourceRightsRecord; } /** * Options for {@linkcode buildResolvedTrainingConfig}. */ export interface ResolvedTrainingConfigOptions { rights?: TrainingAdmissionInputs; log?: (line: string) => void; } /** * Reads, types and admits the config at `path`, and returns the resolved document. * * @throws {TrainingConfigError} for a config the loader or the schema refuses. * @throws {SourceRightsError} for a config that admits a source lacking a permission. */ export declare function buildResolvedTrainingConfig(path: PathBuilderLike, options?: ResolvedTrainingConfigOptions): Promise; /** * Writes the resolved config for the YAML at `configPath` to `outPath` as JSON. */ export declare function writeResolvedTrainingConfig(configPath: PathBuilderLike, outPath: PathBuilderLike, options?: ResolvedTrainingConfigOptions): Promise; //# sourceMappingURL=resolved.d.ts.map