Apply Baseline Corrections to Regression Transformations
Applies corrected JSON from baseline transformations to regression transformations
This endpoint copies user-corrected data from baseline function version transformations to their corresponding regression test transformations. This is useful for:
- Propagating ground truth corrections to regression test data
- Ensuring consistent evaluation data across function versions
- Preparing corrected datasets for evaluation after regression testing
How It Works
- Finds Regression Transformations: Locates transformations created during regression testing
- Matches Baseline Corrections: Finds corresponding baseline transformations with corrected JSON
- Applies Corrections: Copies the corrected JSON to regression transformations
- Returns Summary: Reports applied, skipped, and error counts with transformation IDs
Authorization
API Key Authenticate using API Key in request header
In: header
Request Body
application/json
Name of the function to apply corrections for
Must be an existing function with both baseline and regression transformation data.
^[a-zA-Z0-9_-]+$Baseline version number (source of corrected data)
The function version number that contains transformations with corrected JSON that should be copied to regression transformations.
1 <= valueComparison version number (target for applying corrections)
The function version number of regression transformations that should receive the corrected JSON from the baseline version.
1 <= valueResponse Body
application/json
application/json
application/json
application/json
curl -X POST "https://api.bem.ai/v2/functions/regression/corrections" \ -H "Content-Type: application/json" \ -d '{ "functionName": "invoice-transformer", "baselineVersionNum": 2, "comparisonVersionNum": 3 }'Some corrections applied, others had errors
{
"applied": 18,
"appliedIds": [
"tr-abc-123",
"tr-def-456"
],
"skipped": 2,
"errors": {
"tr-xyz-789": "baseline transformation not found for reference ID: invoice-789"
}
}{
"message": "baselineVersionNum and comparisonVersionNum must be different"
}{
"message": "No regression transformations found for comparison version 4"
}{
"message": "string",
"code": 0,
"details": {}
}