Skip to content

feat(speculation): wire predictor into speculation pipeline - #684

Open
behinddwalls wants to merge 5 commits into
preetam/outcome-predictorfrom
preetam/outcome-predictor-wiring
Open

feat(speculation): wire predictor into speculation pipeline#684
behinddwalls wants to merge 5 commits into
preetam/outcome-predictorfrom
preetam/outcome-predictor-wiring

Conversation

@behinddwalls

@behinddwalls behinddwalls commented Sep 7, 2026

Copy link
Copy Markdown
Collaborator

Summary

Why?

The predictor implementation is additive until the speculation pipeline supplies each dependency's run-local path evidence and uses the revised probability for ranking. A queue predictor block also used to replace the whole factors map, so naming one factor silently reset the rest of the defaults to 1.

What?

Thread path sets through the Generator contract and standard Speculator, replace bestfirst's scorer dependency with the predictor, and compose the evidence predictor from per-queue YAML configuration in orchestrator profiles. Queue predictor blocks overlay named factors onto defaults, profile loading rejects non-finite factors, and best-first ranking tests cover pathPassed, pathFailed, cancelling, and merging through the evidence predictor. Update the generator, best-first, and standard-speculator guides alongside the implementation they describe.

Test Plan

  • ./tool/bazel test //submitqueue/extension/speculation/generator/bestfirst:go_default_test //service/submitqueue/orchestrator/server:go_default_test
  • make fmt

Issues

Stack

@behinddwalls
behinddwalls force-pushed the preetam/outcome-predictor-wiring branch from caeb62b to 3c5ee44 Compare September 8, 2026 00:13
@behinddwalls
behinddwalls force-pushed the preetam/outcome-predictor-wiring branch 2 times, most recently from 61d1369 to 33212d5 Compare September 8, 2026 00:51
## Summary

### Why?

The predictor implementation is additive until the speculation pipeline supplies each dependency's run-local path evidence and uses the revised probability for ranking.

### What?

Thread path sets through the Generator contract and standard Speculator, replace `bestfirst`'s scorer dependency with the predictor, and compose the evidence predictor from per-queue YAML configuration in orchestrator profiles. Neutral default factors preserve scorer-only ranking when no factors are configured.

## Test Plan

- `bazel test //submitqueue/extension/speculation/generator/... //submitqueue/extension/speculation/speculator/... //service/submitqueue/orchestrator/server:go_default_test`
- `make check-gazelle`
## Summary

### Why?

The orchestrator configuration comments still described factors as odds multipliers and referenced fitting work removed from the RFC.

### What?

Describe factors directly as revisions to the scorer price and retain the RFC's neutral, positive-factor contract without changing configuration behavior.

## Test Plan

- ✅ `./tool/bazel test //submitqueue/extension/speculation/predictor/... //submitqueue/extension/speculation/generator/... //submitqueue/extension/speculation/speculator/... //service/submitqueue/orchestrator/server:go_default_test`
- ✅ `make check-gazelle`
## Summary

### Why?

Configuration accepted infinite evidence factors even though the predictor rejects them, and the speculator composition test did not prove that path-set evidence reaches the Generator.

### What?

Reject non-finite factors during profile loading, cover infinite YAML values, and require the exact path-set snapshot in the Generator wiring expectation.

## Test Plan

- ✅ `make fmt`
- ✅ `./tool/bazel test //submitqueue/extension/speculation/predictor/... //submitqueue/extension/speculation/generator/... //submitqueue/extension/speculation/speculator/... //service/submitqueue/orchestrator/server:go_default_test`
A queue predictor block now revises named factors instead of replacing the whole map, so defaults like pathFailed stay in force. Best-first tests rank pathFailed, cancelling, and merging through the evidence predictor rather than a stub.
Update generator and standard-speculator guides for the shared path-set snapshot and predictor-backed best-first ranking.
@behinddwalls
behinddwalls force-pushed the preetam/outcome-predictor-wiring branch from 33212d5 to a97225b Compare September 8, 2026 00:57
@behinddwalls
behinddwalls marked this pull request as ready for review September 8, 2026 01:09
@behinddwalls
behinddwalls requested review from a team and sbalabanov as code owners September 8, 2026 01:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant