The problem
Model training runs can take hours or days. A sleeping Mac halts the training process and may lose checkpoint data.
Why it happens
ML frameworks like PyTorch, TensorFlow, and MLX run as background processes. macOS doesn't know they're doing important work and will sleep when the idle timer runs out.
The fix: Shake It On
Shake It On keeps your Mac awake by moving the mouse slightly at regular intervals. macOS sees real user activity and resets the idle timer. Set it up with the right conditions and it only runs when you're actually machine learning training.
Recommended conditions for machine learning training:
- Only Shake If CPU is above 30%
- Paused When on battery
- Allow display to sleep