Open BielStela opened 1 week ago
Thanks for raising this issue, @BielStela. It appears that there are inconsistencies between how GeneratorVideo
handles iteration and the VideoDataset
save method. We may need to modify GeneratorVideo
to support iteration in a way that aligns with VideoDataset
. Would you be interested in proposing a PR to address this?
Hey @DimedS , let us wait for @BielStela response. If they are unable to raise it, I would like to work on this issue if it is okay with both of you.
Description
VideoDataset
using aGeneratorVideo
does not workContext
I'm truing to create a video using
GeneratorVideo
to see if I can free up some memory. I already tried successfully withSequentialVideo
(which works quite well btw) and refactored to use a generator that yields frames and a GeneratorVideo.Steps to Reproduce
Expected Result
A colorful video similar to this one ( in the preview does not work, hope it does when published)
https://github.com/user-attachments/assets/9b0d1654-b2d3-454a-aef7-cb82ccfa68eb
Actual Result
This error!
If one changes the
node
to use aSequenceVideo
like so:It works well.
Now here it comes my debugging report: One can see that there's a moment when running the pipeline, when the program is at
kedro.runner._run_node_sequential:528
, the code doeswhere
streams
is a list containing myGeneratorVideo
which gets iterated in the chaining. The problem is that the stream itself is an Iterator that gets crystallized into an iterator ofImage.Image
in the operation and iterated over while callingcatalog.save(name, data)
. ThenVideoDataset
takes the control and fails instantly because the input is no longer aGeneratorVideo
nor aSequenceVideo
, it is now anImage
From here I have no more clue about how this can be fixed tho :_)
Your Environment
pip show kedro
orkedro -V
): 0.19.9python -V
): Python 3.11.9