peal.teachers.web_feedback_teacher

File-based feedback teacher for the web demo.

Human2ModelTeacher runs its own Flask server on a port and blocks until a person has clicked through every collage. A job worker behind another web app cannot do that, so this teacher talks to the web app through the job directory:

<feedback_dir>/feedback_request_<round>.json written by the teacher <feedback_dir>/feedback_response_<round>.json written by the web app

The request lists the collages that need a verdict (index, path, source and target class, end confidence); the response maps index -> “true” | “false” | “ood”. The teacher polls for the response file and returns the verdict list in the order of collage_path_list, with the same sentinels Human2ModelTeacher emits for pairs that never reach a person (“student incorrect!” when the student was wrong on the original, “student not swapped!” when the edit did not cross the boundary).

PEAL_WEB_FEEDBACK_AUTO = “true” | “false” | “ood” answers every request without a person (tests, smoke runs).

Classes

WebFeedbackTeacher

Teacher that collects human verdicts through JSON files in a job directory.