fix: remove mid-stream TPOT predictions from predicted-latency producer#2037
fix: remove mid-stream TPOT predictions from predicted-latency producer#2037MicheleCampi wants to merge 1 commit into
Conversation
|
🚨 Unsigned commits detected! Please sign your commits. For instructions on how to set up GPG/SSH signing and verify your commits, please see GitHub Documentation. |
cd109ab to
5e7e43d
Compare
|
/assign @kaushikmitr |
| } | ||
|
|
||
| // processTokenForLatencyPrediction records actual inter-token latency, sampled predictions, and advances timestamp. | ||
| // processTokenForLatencyPrediction records actual inter-token latency and advances the timestamp. |
There was a problem hiding this comment.
dont think this comment is correct. What we are recording is infact TPOT and not ITL
There was a problem hiding this comment.
Good catch — the quantity recorded here is exactly what the codebase calls TPOT (the debug log two lines below labels it actual_tpot_ms, and it feeds the actual side of the predicted-vs-actual comparison). Reworded the comment to say TPOT. Fixed in the rebased commit.
|
please rebase. |
5e7e43d to
101419a
Compare
|
Rebased on current main (efb4db5) — clean, no conflicts. The comment wording flagged above is fixed in the same commit; package tests pass on the rebased branch. |
|
/lgtm |
|
The e2e-tests failure is unrelated to this PR: the coordinator pod exits cleanly mid-test (pod dump shows |
|
There are commit sign failures |
The mid-stream prediction path in processTokenForLatencyPrediction was observability-only and low quality: computed from the scheduling-time metrics snapshot, averaged together with the scheduling-time TPOT prediction, and the only remaining caller of buildPredictionRequest using the scraped RunningRequestsSize gauge (train/serve inconsistency). avgPredictedTPOT now reduces to the scheduling-time prediction, which is the meaningful predicted-vs-actual comparison. The decodeTokenSampler becomes dead code with this removal (its only remaining consumer was the removed prediction path) and is deleted, along with the write-only tpotObservations field. The samplingMean and maxDecodeTokenSamplesForPrediction config parameters are kept in Config for compatibility with existing configs (the strict decoder would otherwise reject them) but are ignored, with a deprecation log when set. Fixes llm-d#2016 Signed-off-by: Michele Campi <215741962+MicheleCampi@users.noreply.github.com>
101419a to
3d176dc
Compare
|
Done — the commit is now SSH-signed and shows as Verified ( |
What type of PR is this?
/kind cleanup
What this PR does / why we need it:
Removes the mid-stream TPOT prediction path from the predicted-latency producer, as proposed in #2016. The sampled mid-stream prediction in
processTokenForLatencyPredictionwas observability-only (consumed byrecordRequestPredictedTPOT, never used for routing/scoring/admission) and low quality: computed fromlastSeenMetrics(the scheduling-time snapshot, not fresh state), averaged together with the scheduling-time TPOT prediction (mixing two incommensurate quantities), and the only remaining caller ofbuildPredictionRequestthat used the scraped vLLMRunningRequestsSizegauge while training entries use the router's in-flight tracker (train/serve inconsistency, see #1856 review).With the removal,
avgPredictedTPOTreduces to the scheduling-time prediction, which is the meaningful predicted-vs-actual comparison, and the gauge/tracker inconsistency disappears by construction.Scope notes:
decodeTokenSamplerbecomes dead code (its only remaining consumer was the removed path, since the actualavgTPOTis computed from e2e latency at end-of-stream) and is deleted along with the write-onlytpotObservationsfield.samplingMeanandmaxDecodeTokenSamplesForPredictionare kept inConfigso existing configs keep parsing under the strict decoder, but the values are ignored; a deprecation message is logged when they are set. Their validation is removed accordingly, and the factory test covers the new accept-and-ignore behavior.buildPredictionRequestitself and its remaining training-path caller are untouched to avoid conflicts with feat: consume InFlightLoadProducer in predicted-latency producer #1856.Which issue(s) this PR fixes:
Fixes #2016
Release note: