Improve download UX and correctness#1764
Open
fl0rianr wants to merge 1 commit into
Open
Conversation
f433a86 to
9387030
Compare
- no 100% before completion - full progress across multi-file downloads - no hardcoded 2 limit
9387030 to
be7243c
Compare
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.
Summary
(completely reworked)
Improves backend install progress for multi-artifact downloads.
Backend installs are not always a single file: vLLM ROCm can use split archives, and ROCm-stable backends may need a TheRock runtime after the backend archive. This PR makes progress reporting consistent across those cases without changing how artifacts are selected, downloaded, or extracted.
TL;DR: Progress now follows the actual install steps instead of relying on hardcoded assumptions about one or two files.
What changed
total_download_sizeis only used when the real full total is known.1.5 GB+.Why this is safer
This makes backend installs safer because the UI no longer has to infer completion from partial progress data.
The install flow now has clearer invariants:
This reduces the risk of showing a backend as complete while required follow-up work is still pending, and it prevents partially installed backend directories from being left behind when a runtime step fails.
Why this is future-proof
The old flow effectively assumed simple cases: one backend archive, or one backend archive plus one runtime step.
The new flow models backend installation as a sequence of logical files/steps. That makes it easier to support future backend layouts, for example:
Adding another runtime step should not require reworking progress semantics again; it should only add another step to the install sequence.
Why this is low risk
This does not change the actual install mechanism:
The PR only makes progress metadata, completion timing, and cleanup behavior more accurate for existing backend install flows.
Scope
Limited to backend install progress, display, and cleanup after failed runtime installs.
Model downloads are intentionally untouched because the HuggingFace manifest path already has explicit file sizes, total size, resume handling, and validation.
Validation
Manually checked: