Generic method for compiling/optimizing a module using a teleprompter.
Details
This file defines the compile generic and its methods for optimizing DSPrrr modules using teleprompters. Compile Generic
See also
compile_module() for the pipe-friendly wrapper with
validation and friendlier argument order
Examples
if (FALSE) { # \dontrun{
classifier <- module(signature("text -> sentiment"), type = "predict")
trainset <- dsp_trainset(
text = c("I love it!", "Terrible experience"),
sentiment = c("positive", "negative")
)
optimized <- compile(LabeledFewShot(k = 2L), classifier, trainset)
} # }