File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed
Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -248,6 +248,11 @@ def output_iterator(self) -> Iterator[Any]:
248248 """
249249 Return an iterator of the prediction output.
250250 """
251+ if (
252+ self .status in ["succeeded" , "failed" , "canceled" ]
253+ and self .output is not None
254+ ):
255+ yield from self .output
251256
252257 # TODO: check output is list
253258 previous_output = self .output or []
@@ -270,6 +275,12 @@ async def async_output_iterator(self) -> AsyncIterator[Any]:
270275 """
271276 Return an asynchronous iterator of the prediction output.
272277 """
278+ if (
279+ self .status in ["succeeded" , "failed" , "canceled" ]
280+ and self .output is not None
281+ ):
282+ for item in self .output :
283+ yield item
273284
274285 # TODO: check output is list
275286 previous_output = self .output or []
You can’t perform that action at this time.
0 commit comments