The United Nations Paris Agreement aims to hold global warming well below 2 °C and pursue 1.5 °C. Given the clear evidence for accelerating climate impacts, the time remaining until these global thresholds are reached is a topic of considerable interest. We use machine learning methods to make truly out-of-sample predictions of that timing, based on the spatial pattern of historical temperature observations. Our results confirm that global warming is already on the verge of crossing the 1.5 °C threshold, even if the climate forcing pathway is substantially reduced in the near-term. Our predictions also suggest that even with substantial greenhouse gas mitigation, there is still a possibility of failing to hold global warming below the 2 °C threshold.