Repository navigation
Expose the regressor model through the http service API - #7517
Merged
Merged
Conversation
The job pulls the given commits (by full hash) from a hg.mozilla.org branch, mines them like the commits DB without storing them, and stores the result of each commit. Backouts and commits ignored by the model are listed with their ignored_reason but not scored, unknown revisions and merges are marked as not available.
GET /<model>/predict/commit/<branch>/<rev> classifies a single commit, and
POST /<model>/predict/commits/<branch> with {"commits": [...]} classifies
up to 100 commits at once. Like the other endpoints, they answer 202 until
the results are available, and only the commits without a result are
queued.
marco-c
force-pushed
the
regressor-http-api
branch
from
November 16, 2026 21:15
afa6d9c to
404d436
Compare
marco-c
marked this pull request as ready for review
November 16, 2026 21:26
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds two endpoints to classify commits with the regressor model:
GET /regressor/predict/commit/<branch>/<rev>: a single commitPOST /regressor/predict/commits/<branch>with{"commits": ["8ba995b74e18334ab3707f27e9eb8f4e37ba3d29", ...]}: up to 100 commitsCommits are identified by their full (40 characters) hg hash.
Like the push/bug endpoints, they answer 202 (
{"ready": false}) until the results are available, then 200.autolandis accepted as a shorthand forintegration/autoland. Results are cached per (model, branch, rev), and only the commits without a result are queued, in jobs of 25.Each commit's result has
node,bug_id,prob,index,class,risk_band,ignored_reasonandextra_data:{"available": false};ignored_reason("backout"/"ignored") and are not scored.Like test selection, the worker job pulls each commit into its autoland clone and mines them with
repository.download_commits(save=False), reusing the commits DB and commit experiences the worker already loads for test selection, so features match training.Known limitations:
risk_bandisnullwhen theREGRESSOR_RISK_BANDSsecret is not set for the service.Unrelated:
/swaggeris already broken on master, see #7516.