Skip to content

Add progress bar to checkpoint download#157

Merged
yanghan234 merged 1 commit into
mainfrom
fix/download-progress-bar
May 11, 2026
Merged

Add progress bar to checkpoint download#157
yanghan234 merged 1 commit into
mainfrom
fix/download-progress-bar

Conversation

@yanghan234
Copy link
Copy Markdown
Collaborator

Problem

When the calculator downloads pretrained checkpoints for the first time, download_file() uses requests.get(url) which loads the entire file into memory with no progress indication. For large checkpoint files, this makes it appear as if the process is stuck.

Fix

  • Switch to streaming download (stream=True + chunked writing)
  • Add a tqdm progress bar showing filename, downloaded/total size, speed, and ETA
  • tqdm is already a dependency used elsewhere in the codebase

Use streaming download with tqdm progress bar in download_file() so users
can see download progress (file size, speed, ETA) instead of the process
appearing to hang during first-time checkpoint downloads.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@yanghan234 yanghan234 marked this pull request as ready for review May 11, 2026 15:05
@yanghan234
Copy link
Copy Markdown
Collaborator Author

@copilot review this PR

Copy link
Copy Markdown
Contributor

Copilot AI commented May 11, 2026

@copilot review this PR

I reviewed this PR and re-checked the download path; no further changes are needed from my side. The current implementation in 004eac0 correctly streams the file and reports progress via tqdm.

@yanghan234 yanghan234 merged commit 114d4c1 into main May 11, 2026
8 checks passed
@yanghan234 yanghan234 deleted the fix/download-progress-bar branch May 11, 2026 15:10
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.

2 participants