Commit Graph

675 Commits

Author SHA1 Message Date
rav4kumar 752c6129ed Merge remote-tracking branch 'origin/laneful-curves' into tempt 2026-10-26 12:37:04 -07:00
rav4kumar 746a776abb booost 2026-10-26 12:35:42 -07:00
discountchubbs bec376c25b ci 2026-10-26 12:28:51 -07:00
James Vecellio-Grant bf212e2386 more accurate 2026-10-26 12:21:43 -07:00
James Vecellio-Grant d6578461bd better 2026-10-26 12:21:13 -07:00
James Vecellio-Grant c131d7ec0b reduce 2026-10-26 12:19:57 -07:00
James Vecellio-Grant aeaa51bd1e more 2026-10-26 12:18:31 -07:00
James Vecellio-Grant faa1fd6a50 more accurate 2026-10-26 12:17:05 -07:00
nayan 69acd8bbee add custom model gate & Alpha tag 2026-10-26 15:09:50 -04:00
Kumar 914aaefac1 Merge branch 'master' into toyota-bsm 2026-10-26 11:35:14 -07:00
rav4kumar d05649c0a4 toyota: bump opendbc and fix BSM wiring 2026-10-26 11:32:51 -07:00
discountchubbs ddfe022d74 early return 2026-10-25 20:52:33 -07:00
James Vecellio-Grant ebff0645cf Merge branch 'master' into laneful-curves 2026-10-25 20:20:55 -07:00
Jason Wen a06366ce92 controls: decouple RELC from BSM blocking, allow nudge override (#2049)
* controls: decouple RELC from BSM blocking, allow nudge override

* nah
2026-10-25 22:48:26 -04:00
rav4kumar 60a9cc8657 toyota: add Enhanced Blind Spot Monitoring setting 2026-10-25 11:55:32 -07:00
royjr 99700587d8 hold blue 2026-10-25 08:52:19 -04:00
discountchubbs 10b508929d smoother 2026-10-23 23:17:33 -07:00
discountchubbs 9d98fe4376 he does not like 1ms 2026-10-23 11:56:25 -07:00
discountchubbs 0ce9fca933 decay one line and give full authority in curvy curves; kappa=curv 2026-10-23 11:55:31 -07:00
discountchubbs cda505ea6d satisfy royjr 2026-10-22 23:54:18 -07:00
discountchubbs aa559e48a2 smoother release authority 2026-10-22 23:52:10 -07:00
royjr 02c7b60600 fine 2026-10-23 00:35:06 -04:00
royjr d28e027943 keep pill current 2026-10-23 00:12:41 -04:00
royjr f179460982 so I can sleep at night 2026-10-23 00:05:04 -04:00
royjr 16b17e051f tick on new data 2026-10-23 00:03:15 -04:00
royjr 8efe325a71 gate like rainbow 2026-10-22 23:55:28 -04:00
royjr 9c391b4842 cleanup 2026-10-22 23:46:50 -04:00
royjr 6ac88a7be0 move to models 2026-10-22 23:25:32 -04:00
royjr 4dbb49430b tizi 2026-10-22 23:25:32 -04:00
royjr 5de324ab96 ill take it from here thanks 2026-10-22 23:25:32 -04:00
royjr d904487eed sqrt bar 2026-10-22 23:25:32 -04:00
royjr 2ffb986f3b blue only 2026-10-22 23:25:32 -04:00
discountchubbs c4f1dc179f dead 2026-10-22 20:17:03 -07:00
royjr 15bf3dcd94 fade out blue 2026-10-22 18:15:10 -04:00
royjr 6e0ce4a6f9 match width 2026-10-22 18:15:10 -04:00
royjr d45d7e2de7 white is model path 2026-10-22 18:15:10 -04:00
royjr a3ef498512 dont guess 2026-10-22 18:15:10 -04:00
royjr 21f45673fd use blendful trust 2026-10-22 18:15:10 -04:00
royjr fd39f4f820 fade on trust 2026-10-22 18:15:10 -04:00
royjr cb71cdc54d use constants 2026-10-22 18:15:10 -04:00
royjr afd0ce66c9 no tap 2026-10-22 18:15:10 -04:00
royjr 5854346c2f blendful 2026-10-22 18:15:10 -04:00
James Vecellio-Grant 270704ad47 Merge branch 'master' into laneful-curves 2026-10-22 10:55:59 -07:00
James Vecellio-Grant 9d029d683d models: self healing test for tg (#2072)
* models: self healing test for tg

* rm container

* ew

* set env

* set var
2026-10-22 13:43:42 -04:00
James Vecellio-Grant 4ebb756ee5 Merge branch 'master' into laneful-curves 2026-10-22 10:15:23 -07:00
Amy Jeanes f78c6c2377 models: publish the download speed and derive the eta from it (#2052)
* models: publish the download speed and derive the eta from it

Fills in DownloadProgress.speed (bytes per second, declared with the parallel
downloader). The reporter measures the rate between its 0.5 s reports, smooths
it, and derives the eta from the bytes remaining at that rate instead of
extrapolating elapsed time. Speed is zeroed when a download ends, fails or is
cancelled and for a cached artifact, and copied across artifacts that share a
file like the other progress fields.

The big UI's Models page shows "12.3 MB/s" next to the progress bar and the
mici models panel shows it beside the percentage. Both take the max across a
bundle's artifacts, not the sum, since artifacts sharing a file mirror the same
transfer and only one file is ever in flight.

A stall decays the smoothed speed toward 0 without ever reaching it, so below
0.05 MB/s, which would only display as "0.0 MB/s", it snaps to 0. Both UIs
then show "--.- MB/s" while downloading with no rate (before the first reading
or during a stall) instead of a stuck "0.0 MB/s" or nothing, and the speed
recovers straight to the real rate once data flows again. The snap also keeps
the eta in range: without it a stall of about 25 s drove remaining / speed past
the capnp UInt32 eta, and the capnp error failed the download outright instead
of leaving the stall to the read timeout and retries. A test holds a piece
stalled until the published speed reaches exactly 0, and errors on that
overflow without the snap.

Assisted-by: Claude Code (Claude Opus 4.8)
Assisted-by: Claude Code (Claude Opus 5.5)

* remove unneeded comments

Assisted-by: Claude Code (Claude Opus 5.5)

* models: take the speed baseline before the workers start

The reporter took its starting byte count after the piece workers were
submitted, and starting each pool thread lets earlier workers run, so
bytes landed in that gap never counted toward a speed sample. Take the
baseline in _download_file before any worker exists and pass it in.

The test runs every piece inline in submit, so the whole file lands
before the reporter starts; with the late baseline the speed stays 0.

Assisted-by: Claude Code (Claude Opus 5.5)
2026-10-21 16:13:52 -07:00
nayan ee7bf203fe ffs 2026-10-21 17:20:08 -04:00
Amy Jeanes ddd7b14ebc models: download whole-file artifacts with parallel byte ranges (#2051)
* models: download whole-file artifacts with parallel byte ranges

HuggingFace's Xet CAS throttles each connection to roughly 1-2 MB/s but does
not limit connection count, so the single-stream _download_file left the link
idle most of the time. Replace it with a downloader that probes the size with
a one-byte Range request, creates the file at its final size and streams each
8 MB piece straight to its offset from one of 12 worker threads. The file is
never copied or assembled and only ever occupies its own size on disk. A
server that answers the probe with 200 gets one plain stream instead.
Every request sends Accept-Encoding: identity, because byte ranges count
encoded bytes while requests hands back decoded ones, so a compressed
response would land at the wrong offsets and fail as a short read.

Workers only write bytes; a reporter coroutine on the event loop publishes
progress every 0.5 s (instead of every 128 KB), re-raises the first worker
failure and polls the cancel ref. Transient errors (connection, timeout,
truncated body, HTTP 408/429/500/502/503/504) give a piece up to three
attempts; any other HTTP error fails the download at once. The whole-file
path now also publishes "verifying" while hashing before and after the
transfer, and the download is hashed against the manifest exactly as before.

A cancel has to wait for in-flight pieces to unwind (a blocked socket read
cannot be interrupted), so the row shows "canceling..." through a new
DownloadProgress.canceling flag instead of a frozen bar, and the mici cancel
button hides once the ref is gone, as it already does on the big UI.

DownloadProgress gains speed, canceling and resuming, appended to the capnp so
older readers are unaffected. All three are declared here so the wire format
lands in one place; speed and resuming are filled in by the follow-up speed
and resume changes.

Builds on #2050, which drops chunking and publishes models as whole files;
this makes that whole-file download parallel.

Measured on a comma 3X on WiFi: ~2 MB/s single stream, 17-24 MB/s steady and
30-60 MB/s peak with 12 range connections, the count picked from an on-device
sweep. Disk is not the bottleneck (eMMC writes at 56-67 MB/s with fdatasync).

Tests drive the real downloader against a local threaded range server: piece
tiling, actual parallelism (a stalled piece does not block the others), the
no-range fallback, per-piece retry, 4xx, cancel via ModelManager_DownloadRef
and mid-piece, verify/cached/downloaded state, a probe failure moving
past verifying, and hash mismatch cleanup.

Also drops two chunk-era leftovers in the tests: a stale "no chunks" note on
manifest_bundle and a one-item URL loop in the live manifest check.

Assisted-by: Claude Code (Claude Opus 4.8)
Assisted-by: Claude Code (Claude Opus 5.5)

* remove unneeded comments

* models: trim the manager tests to the regressions they catch

Each remaining test is there because a deliberate break in manager.py,
helpers.py or fetcher.py fails it. Tests that only re-checked what another
already catches are merged into a happy-path download or a table, and
checks of constants rather than behaviour are dropped. The fake server
now starts per test, keeps its state in one dataclass, and can cut a
response short.

Against 66 deliberate breaks, every one the old tests caught still fails,
and a 404 being retried, a short read and its retry, and the display
flags choosing the big model without a GPU are now caught too.

Assisted-by: Claude Code (Claude Opus 5.5)

* Update test_manager_download.py

* Update manager.py

---------

Co-authored-by: James Vecellio-Grant <159560811+Discountchubbs@users.noreply.github.com>
2026-10-21 09:35:43 -07:00
discountchubbs 62cf10ff05 let unwind be handled by laneless 2026-10-21 08:17:55 -07:00
discountchubbs 7707a3e384 interpolate smoothness on straights to reduce mr kumar and his mdv3 jiggle shennanigans 2026-10-20 22:56:10 -07:00