Tracking Down Mysterious ML Training Stalls

316 · Pinterest · Oct. 17, 2025, 4:12 p.m.
Summary
The blog post details Pinterest's experience upgrading its PyTorch version, which unexpectedly caused a 50% drop in ML training throughput. Through diligent debugging, the team identified issues related to the `torch.compile` function and an excessive memory statistics monitoring task from Ray that introduced significant latency. Ultimately, they removed the problematic monitoring function and achieved a 20% speed improvement instead of the initial drop. The post emphasizes the importance of reproducible test cases and the judicious use of AI tools in resolving complex engineering problems.