Skip to content

Conversation

NicolasHug
Copy link
Contributor

No description provided.

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Meta Open Source bot. label Mar 7, 2025

# {stream_index -> {frame_index -> frame_info}}
default_stream_index: int
stream_infos: Dict[int, Union[TestVideoStreamInfo, TestAudioStreamInfo]]
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Moving that field into the base class TestContainerFile which will be needed for audio anyway.
It needed here already because we need to know the number of streams within __post_init__ just below, and we using stream_infos for that.
(Ideally we wouldn't need to, and just collapse all classes to be single-stream, but that's for later).

# .frames may be manually set: for some streams, we don't need
# the info for all frames. We don't need to load anything in
# this case
continue
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't feel too strongly about this but if we were to enforce the existence of a json file for every single asset, it would raise the barrier to the first test when e.g. adding a new test asset, which I think isn't desirable.

35: TestFrameInfo(pts_seconds=1.1678, duration_seconds=0.033367),
},
},
frames={}, # Automatically loaded from json file
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have to create an empty frames field here. This field cannot have a default within the TestContainerFile definition, because defaults aren't allowed for base dataclasses

@NicolasHug NicolasHug merged commit e423460 into meta-pytorch:main Mar 7, 2025
46 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Meta Open Source bot.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants