We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 196aef0 commit 9a293e6Copy full SHA for 9a293e6
1 file changed
replicate/prediction.py
@@ -248,6 +248,11 @@ def output_iterator(self) -> Iterator[Any]:
248
"""
249
Return an iterator of the prediction output.
250
251
+ if (
252
+ self.status in ["succeeded", "failed", "canceled"]
253
+ and self.output is not None
254
+ ):
255
+ yield from self.output
256
257
# TODO: check output is list
258
previous_output = self.output or []
@@ -270,6 +275,12 @@ async def async_output_iterator(self) -> AsyncIterator[Any]:
270
275
271
276
Return an asynchronous iterator of the prediction output.
272
277
278
279
280
281
282
+ for item in self.output:
283
+ yield item
273
284
274
285
286
0 commit comments