Skip to content

fix: reject degenerate RTT predictions in adaptive concurrency - #960

Open
MuhammadMaazA wants to merge 1 commit into
huggingface:mainfrom
MuhammadMaazA:fix/875-rtt-degenerate-predictions
Open

fix: reject degenerate RTT predictions in adaptive concurrency#960
MuhammadMaazA wants to merge 1 commit into
huggingface:mainfrom
MuhammadMaazA:fix/875-rtt-degenerate-predictions

Conversation

@MuhammadMaazA

@MuhammadMaazA MuhammadMaazA commented Sep 5, 2026

Copy link
Copy Markdown

Fixes #875.

This change makes the RTT regression reject near-singular fits using a relative conditioning check instead of an absolute determinant threshold. This prevents very small variation in transfer sizes from producing unstable slopes and unrealistic extrapolated RTTs.

It also prevents a clamped zero RTT from being converted into a synthetic ~9.5 TiB/s bandwidth estimate by returning None for non-positive predicted RTTs.

Tests cover both the near-singular regression case and the zero-RTT bandwidth case.


Note

Medium Risk
Changes numeric guards in the RTT regression path used by adaptive concurrency; behavior shifts from extreme bogus estimates to None/zero bandwidth when fits are degenerate.

Overview
Tightens adaptive concurrency RTT modeling so unstable or meaningless predictions do not drive concurrency decisions.

Online regression (ExpWeightedOnlineLinearRegression) now treats the normal equations as ill-conditioned when delta is tiny relative to sw * sxx, not only when |delta| is below a fixed absolute floor. Near-collinear x values (e.g. transfer sizes that barely differ) no longer produce extrapolated slopes/RTTs; predict and coefficients return None in those cases.

Bandwidth from RTT (RTTPredictor::predicted_bandwidth) returns None when the predicted RTT at the probe size is ≤ 0, instead of dividing by a clamped zero via min_rtt.max(1e-6) and reporting a huge synthetic throughput. Downstream, the controller already maps missing bandwidth to 0.

New unit tests cover near-singular x rejection and the zero/clamped-RTT bandwidth case.

Reviewed by Cursor Bugbot for commit 9dfcc24. Bugbot is set up for automated code reviews on this repo. Configure here.

@seanses

seanses commented Sep 11, 2026

Copy link
Copy Markdown
Collaborator

I'm not sure if the referenced issue is valid or needs fix. Will double check. Low priority.

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.

Adaptive concurrency: RTT predictor emits degenerate predictions from near-singular fits

2 participants