Train Classifier
POST /api/divinity/project-classifier/train
Train (or skip) the project’s classifier.
Returns the resulting status + skip flags so the UI can show “trained successfully” vs “skipped because nothing changed” vs “skipped because corpus too small” without re-querying.
Request Body required
Section titled “Request Body required ”Body for POST /api/divinity/project-classifier/train.
object
Responses
Section titled “ Responses ”Successful Response
Response body for the non-streaming train route.
object
Snapshot of one project’s classifier state.
Persisted to data/ml/project-{id}/classifiers/meta.json;
served by GET /api/divinity/project-classifier/status.
is_low_quality flips on when the trained classifier’s
cross-validated F1 macro falls below
low_quality_cv_f1_threshold (default 0.40). Predictions are
still served — the UI surfaces the flag so the author knows the
model trained on insufficient or noisy signal and that confident
predictions may be wrong.
object
object
Validation Error