pub struct CompileRequest<'a> {
pub module: &'a mut dyn Module,
pub trainset: &'a [Example],
pub ctx: &'a Context,
pub teacher_ctx: Option<&'a Context>,
pub valset: Option<&'a [Example]>,
pub progress: &'a ProgressFn,
}Expand description
Per-call inputs for Optimizer::compile.
Bundled so additive fields don’t break-change every impl, and so the
adjacent &Context / Option<&Context> pair can’t be transposed at the
call site. Optimizers that don’t need every field simply ignore the
destructured locals.
Fields§
§module: &'a mut dyn ModuleThe module to optimize (mutated in place).
trainset: &'a [Example]Training examples for demo generation / selection.
ctx: &'a ContextThe student context (LM + adapter for evaluation).
teacher_ctx: Option<&'a Context>Optional stronger LM context for demo generation.
valset: Option<&'a [Example]>Optional validation set for scoring candidates.
progress: &'a ProgressFnCallback for progress updates.
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for CompileRequest<'a>
impl<'a> !UnwindSafe for CompileRequest<'a>
impl<'a> Freeze for CompileRequest<'a>
impl<'a> Send for CompileRequest<'a>
impl<'a> Sync for CompileRequest<'a>
impl<'a> Unpin for CompileRequest<'a>
impl<'a> UnsafeUnpin for CompileRequest<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more