VideoDataSet with GeneratorVideo save is broken #232
Labels
bug
Something isn't working
Community
Issue/PR opened by the open-source community
Hacktoberfest
help wanted
Contribution task, outside help would be appreciated!
Description
I wasn't sure if I should put this issue here or in the Kedro core repo since the
VideoDataSet
has been broken after a change in Kedro core.Shortly, the video dataset has multiple backends that can be saved. One of them is the
GeneratorVideo
which is anIterable
.In commit fcf3ab4a9 "Enable the usage of generator functions in nodes (#2161)" by @idanov the runner functionality was changed to handle generator datasets.
Snippet from
_run_node_sequential
inkedro/runner/runner.py
:Context
I have not had time yet to dive into the code and see what is actually happening, or how we should treat it in these situations. The effect now is that the runner will yield the first frame from the video and try to save that frame to the Video Dataset which is not possible.
The quick and dirty way to fix it would be to remove the
__iter__
method from theGeneratorVideo
class and implement some special logic in theVideoDataSet
class to iterate it correctly. This would however not be very nice from a user perspective sinceiter(video)
would then result in an indexed-iteration of the generator.Steps to Reproduce
GeneratorVideo
VideoDataSet
The text was updated successfully, but these errors were encountered: