peal.teachers.teacher_factory

Factory that turns a teacher config value into a TeacherInterface.

Teachers are PEAL’s sources of feedback on counterfactuals (human GUI, an oracle model, an LLM, symbolic rules, segmentation masks, …). Adaptor configs such as CFKD’s specify the teacher as a string ("human@8000", "Baseline:<strategy>", "web:<dir>", a .cpl model path, …), a dict with a type key, an nn.Module or an already built teacher; get_teacher resolves all of these to one object.

Functions

get_teacher

Build the teacher described by teacher.