v36

OpenAPI 3.1.0raw.githubusercontent.com2026-08-0187270483.0 KB
Function Accuracy

Apply Baseline Corrections to Regression Transformations

Copy baseline corrections onto regression transformations.

Looks up regression transformations created against the comparison version (isRegression: true, correctedJSON IS NULL), finds the matching baseline transformation by referenceID, and copies the baseline's correctedJSON onto the regression row via the same code path used by POST /v3/events/{eventID}/feedback. The applied corrections are immediately scored against the regression output, populating the confusion-matrix metrics used by function-review and function-version-compare.

Works for every function type that produces correctable transformations, including extract on both the vision and OCR paths. (Previously the vision path silently dropped is_regression during the original regression run, so no rows matched the predicate — that has been fixed.)

Returns counts plus the list of event KSUIDs whose underlying regression transformation received a correction. Errors (e.g. baseline transformation missing for a given referenceID) are returned per-row in the errors map, keyed by event KSUID, rather than aborting the whole call.

post/v3/functions/regression/corrections

Request body

functionNamestring required

Name of the function to apply corrections for

Must be an existing function with both baseline and regression transformation data.

baselineVersionNuminteger required

Baseline version number (source of corrected data)

The function version number that contains transformations with corrected JSON that should be copied to regression transformations.

comparisonVersionNuminteger required

Comparison version number (target for applying corrections)

The function version number of regression transformations that should receive the corrected JSON from the baseline version.

Response

The request has succeeded.

appliedinteger required

Number of corrections that were applied successfully.

appliedEventIDsstring[] required

Event KSUIDs whose underlying regression transformation had a baseline correction copied onto it.

skippedinteger required

Number of regression transformations that were skipped — typically because they already had a correction or did not have a usable reference ID.

errorsobject required

Map of event KSUID to error message for any regression rows where the correction could not be applied (e.g. baseline transformation not found for the row's reference ID).