Skip to content

v1.40.3

Latest

Choose a tag to compare

@wangxingjun778 wangxingjun778 released this 09 Nov 09:43
53525f5

Enhance

  • Requires modelscope-hub>=0.7.0.
  • New modelscope.utils.file_utils.get_hub_cache_root(); modelscope.hub.cache_manager re-exports get_cache_root and resolve_cached_snapshot. MS_CACHE_HOME is normalised to an absolute path when bridged into the hub config.

Fix

  • model_file_download(..., local_files_only=True) no longer calls the API to resolve the default revision, so offline downloads from cache work without network access or credentials.
  • ms clear-cache lists every resolved target before deleting and delegates to modelscope-hub's scoped cache APIs; cache deletion via FileSystemCache goes through the same validated removal, refusing empty identifiers, path traversal, out-of-root targets and symlinked paths.
  • update_local_model no longer copies models that already live under the legacy model root or the modelscope-hub cache root.
  • Hugging Face patch: hf_hub_download translates missing files to EntryNotFoundError and cache misses to LocalEntryNotFoundError, so callers relying on Hugging Face exception types keep working.
  • modelscope.hub.snapshot_download exports InvalidParameter again, preserving the shim module's exception contract.

Docs

  • Docstrings for the legacy cache-path helpers now state that they describe the legacy layout only and point to get_hub_cache_root(), snapshot_download() and resolve_cached_snapshot().

What's Changed

Full Changelog: v1.40.2...v1.40.3