Skip to content

Refactor _hf_download to improve subprocess handling and stdout capture#58

Closed
main-voice wants to merge 1 commit into
NVIDIA:mainfrom
main-voice:fix/hf-download-hang-without-any-hints
Closed

Refactor _hf_download to improve subprocess handling and stdout capture#58
main-voice wants to merge 1 commit into
NVIDIA:mainfrom
main-voice:fix/hf-download-hang-without-any-hints

Conversation

@main-voice

Copy link
Copy Markdown
Contributor
  • Removed the --format=json option to allow tqdm progress bars to display correctly.
  • Changed from subprocess.run to subprocess.Popen for better control over the child process.
  • Captured stdout lines to ensure the last line (local snapshot path) is returned correctly.
  • Added error handling to ensure the child process is killed on exceptions, preventing stale file-lock deadlocks.

- Removed the --format=json option to allow tqdm progress bars to display correctly.
- Changed from subprocess.run to subprocess.Popen for better control over the child process.
- Captured stdout lines to ensure the last line (local snapshot path) is returned correctly.
- Added error handling to ensure the child process is killed on exceptions, preventing stale file-lock deadlocks.
@foreverlms foreverlms closed this Jun 26, 2026
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