Skip to content

Harden model weight acquisition and deserialization - #18

Open
bleugreen wants to merge 4 commits into
mainfrom
agent/DPRT-7-builder-1
Open

Harden model weight acquisition and deserialization#18
bleugreen wants to merge 4 commits into
mainfrom
agent/DPRT-7-builder-1

Conversation

@bleugreen

Copy link
Copy Markdown
Owner

Summary

  • pin the supported DeepRhythm model to an immutable commit URL, filename, byte size, and SHA-256 digest
  • verify cached files and stream downloads into same-directory temporary files before atomic publication
  • centralize verified acquisition and safe torch.load(..., weights_only=True) deserialization for predictor and batch inference
  • add regression coverage for valid and corrupt caches, pinned request parameters, HTTP and stream failures, size and digest rejection, cleanup, atomic replacement, and safe deserialization

Verification

  • uv run pytest tests/test_utils.py — 27 passed
  • copied weights/deeprhythm-0.7.pth into the cache, then uv run pytest — 68 passed
  • uv run ruff check src/ tests/ — passed
  • repository search confirms the only torch.load is the shared helper with weights_only=True
  • repository search confirms no mutable branch model URL remains

@bleugreen
bleugreen force-pushed the agent/DPRT-7-builder-1 branch from 5fc5f5f to 630f126 Compare July 21, 2026 01:02
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