Assertion: Student and teacher must have the same number of predictors.
optimizer = BootstrapFewShotWithRandomSearch(
metric=MyModule.metric,
teacher_settings=dict({"lm": teacher_lm}),
)
teacher_module, _ = MyModule.load_compiled_model()
for _ in range(2):
student_module = MyModule().activate_assertions()
teacher_module = optimizer.compile(
student = student_module,
teacher = teacher_module,
trainset=train_set
)
return teacher_module