This PR fixes an issue with replicate.run() where it would fallback to polling irregardless of the wait parameter. We now skip the waiting if it looks like we have a prediction with output back.
There are a whole bunch of issues with the vcr library we're using at the moment. I've got it working but I don't think the fixtures are in an ideal state.
The vcr recording mode doesn't work with asyncio, so you need to generate the fixtures using the sync api. Commenting out all of the async & await syntax. Then the test will run just fine without.
The path argument passed to vcr() decorator is not respected while recording. Apparently it does work if you rename the generated file, but I've not tried this yet.
This PR fixes an issue with
replicate.run()
where it would fallback to polling irregardless of thewait
parameter. We now skip the waiting if it looks like we have a prediction with output back.There are a whole bunch of issues with the
vcr
library we're using at the moment. I've got it working but I don't think the fixtures are in an ideal state.vcr
recording mode doesn't work with asyncio, so you need to generate the fixtures using the sync api. Commenting out all of theasync
&await
syntax. Then the test will run just fine without.vcr()
decorator is not respected while recording. Apparently it does work if you rename the generated file, but I've not tried this yet.