Repository navigation
Desktop: keep the download time left steady (ATO-1342) - #1146
Draft
sosidudku1 wants to merge 2 commits into
Draft
sosidudku1 wants to merge 2 commits into
sosidudku1 wants to merge 2 commits into
Conversation
A foreground `models pull` writes a line for every progress tick while the percent is a multiple of 5, with bytes rounded to 0.01 GB. dlRateStep took a slope between any two lines, so lines from one burst gave a speed of zero or far above the real one and the time left on the download card jumped. Keep the previous sample until the bytes have moved and at least 3 seconds have passed, so a slope spans the whole stretch. Measure afresh when the byte counter goes back or stays still for 60 seconds. The first estimate appears a few seconds later.
The CLI prints bytes in 0.01 GB steps, so at 100 KB/s the counter sits still for over a minute between steps. The 60 s stall reset blanked the estimate at every step and moved the last sample to the reset, so the next slope read twice the real speed and the time left showed about half. A stall now needs 300 s, keeps the moment the counter first showed those bytes, and only drops the rate. A slope also has to span at least four 0.01 GB steps, so a burst's first line, rounded half a step up, cannot read as many times the real speed. A 100 KB/s replay joins the tests.
This branch has not been deployed
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.
Fixes ATO-1342.
What was wrong. On a 1.3 GB download that took about 3 minutes, the time left on the download card jumped: 5 min, 9 min, 2 min, under a minute, 4 min, 8 min. A foreground
models pullwrites a line for every progress tick while the percent is a multiple of 5, with bytes rounded to 0.01 GB.dlRateSteptook a slope between any two lines, so lines from one burst gave a speed of zero or far above the real one.What changed
dlRateStepkeeps the previous sample until the bytes have moved and at least 3 seconds have passed, so a slope spans the whole stretch (then the same 0.3 smoothing as before).desktop/test/download-eta-steady.test.mjsreplays the CLI's bursty lines and checks the estimate stays within range of the truth, at 28 MB/s and at 100 KB/s.How to check. Download a model of a few GB from Settings or the picker and watch the card: the time left moves down steadily instead of jumping between 2 and 9 minutes.
Not yet checked on the second Mac.