Developer Tools

trunk/781b5d1dc94544bcc3841ad7babcd1be783a5056: [CI] Enable TIMM pretrained model caching on shared HF cache (#174596)

A simple caching fix just unlocked faster AI model testing for everyone...

Deep Dive

PyTorch engineers resolved a critical CI bug where the TRANSFORMERS_OFFLINE=1 setting was blocking Hugging Face Hub downloads, causing TIMM model benchmarks to fail. The fix adds a --download-only flag to pre-download all models and implements a pin-specific cache directory with a stamp file to ensure the TIMM cache is ready before testing. This prevents automated testing pipelines from breaking when offline mode is enabled.

Why It Matters

This ensures reliable CI/CD pipelines for AI developers, preventing costly test failures and speeding up model evaluation.