Learning to Forecast and Forecasting to Learn from the COVID-19 Pandemic