You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Bug fixes for the wait option in replicate.run (#315)
There were a couple of small bugs in the current implementation:
1. We would pass non-boolean, non-integer values through to `predictions.create` when it was an object with an interval, resulting in the blocking mode being used accidentally.
2. We would pass the boolean/integer values through to `wait` which would create a runtime error when the `wait` function expects an object.
3. We continued to poll for the prediction despite the blocking response returning the output data.
This PR addresses these three issues by checking if the run should be blocking and passing the correct arguments in the correct places. We also assume that if the returned prediction is not in `starting` state then it is completed. This isn't ideal but works for the moment.
Lastly, in the case where the blocking request times out the client will fall back to polling at the default interval.
0 commit comments