Skip to content

[Refactor] Refactor the modelscope download module#1683

Merged
wangxingjun778 merged 14 commits into
modelscope:masterfrom
wangxingjun778:feat/download_speedup
Apr 21, 2026
Merged

[Refactor] Refactor the modelscope download module#1683
wangxingjun778 merged 14 commits into
modelscope:masterfrom
wangxingjun778:feat/download_speedup

Conversation

@wangxingjun778
Copy link
Copy Markdown
Member

@wangxingjun778 wangxingjun778 commented Apr 21, 2026

  • Architectural Refactor (ModelScope): Rebuilt the ModelScope download architecture using a producer-consumer pipeline to significantly enhance download performance and user experience.
  • Optimized Downloads: Implemented server-side prefix and paginated filtering to reduce memory usage during snapshot downloads.
  • Enhanced Reliability: Added a retry mechanism for hash validation failures and increased buffer size for hash computations.
  • Improved Error Handling: Integrated fault-tolerant reporting, ensuring pagination errors and partial download failures trigger exceptions to maintain snapshot consistency.
  • Dependency Updates: Updated Python build dependencies (pip and setuptools).

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates Python build dependencies (pip and setuptools) and optimizes the model/dataset download process. Key improvements include implementing a retry mechanism for hash validation failures, introducing server-side prefix filtering and paginated filtering to reduce memory usage during snapshot downloads, and increasing the buffer size for hash computations. Additionally, the download process now includes fault-tolerant reporting, though feedback highlights the need to ensure that pagination errors and partial download failures trigger exceptions to prevent inconsistent snapshot states.

Comment thread modelscope/hub/snapshot_download.py
Comment thread modelscope/hub/snapshot_download.py
@wangxingjun778 wangxingjun778 merged commit 862afee into modelscope:master Apr 21, 2026
2 checks passed
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