gepa-ts
Version:
TypeScript implementation of GEPA (Gradient-free Evolution of Prompts and Agents) - Complete port with 100% feature parity
27 lines • 993 B
TypeScript
import { DataInst } from '../types/index.js';
export interface BatchSampler<D = DataInst> {
sample(trainset: D[], iteration: number): D[];
}
export declare class EpochShuffledBatchSampler<D = DataInst> implements BatchSampler<D> {
private minibatchSize;
private rng;
private shuffledData?;
private currentIdx;
private currentEpoch;
constructor(minibatchSize?: number, rng?: () => number);
sample(trainset: D[], iteration: number): D[];
private shuffle;
}
export declare class RandomBatchSampler<D = DataInst> implements BatchSampler<D> {
private batchSize;
private rng;
constructor(batchSize?: number, rng?: () => number);
sample(trainset: D[], _iteration: number): D[];
}
export declare class SequentialBatchSampler<D = DataInst> implements BatchSampler<D> {
private batchSize;
private currentIdx;
constructor(batchSize?: number);
sample(trainset: D[], _iteration: number): D[];
}
//# sourceMappingURL=batch-sampler.d.ts.map