i think it'd be nice to have also a `retry_no` to limit this loop, so that one can say: "try to predict, but only up to 50 secs total"