Skip to content

Pin prediction cache to resolved model revisions - #1369

Open
LarryHu0217 wants to merge 1 commit into
huggingface:mainfrom
LarryHu0217:codex/cache-resolved-model-sha-1364
Open

Pin prediction cache to resolved model revisions#1369
LarryHu0217 wants to merge 1 commit into
huggingface:mainfrom
LarryHu0217:codex/cache-resolved-model-sha-1364

Conversation

@LarryHu0217

Copy link
Copy Markdown

What does this PR do?

Include the immutable Hub revision already resolved by the Transformers and VLM backends in the prediction cache identity.

This prevents a mutable revision such as main from reusing predictions generated by older model weights. Backends that do not expose an immutable identity retain their existing cache hashes.

The caching documentation now also explains the remaining limitation for local model directories and opaque endpoints whose weights are replaced in place.

Addresses #1364

Testing

  • Focused cache revision and Transformers tests: 2 passed, 8 deselected, 3 subtests passed
  • Runnable cache unit-test subset: 6 passed, 1 skipped, 3 deselected, 15 subtests passed
  • Ruff check: passed
  • Ruff format check: passed

The full cache module was also attempted locally. Tests requiring the optional vLLM and torchvision backends could not run because those dependencies are not installed.

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