Skip to content

Add progress bar to checkpoint download#157

Draft
yanghan234 wants to merge 1 commit intomainfrom
fix/download-progress-bar
Draft

Add progress bar to checkpoint download#157
yanghan234 wants to merge 1 commit intomainfrom
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>
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.

1 participant