-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[torchcodec] refactor test utils to be based around dataclasses (#57)
Summary: Pull Request resolved: #57 Refactors our testing utilities to consider the actual reference file to be a first-class concept by making it an object, and then all operations we do are on that object. Some principles I was trying to keep: 1. There should be one clear definition of a reference media file, with all of its important parameters in one place with names that have obvious semantic meaning. 2. Operations that are conceptually connected to a reference media file should be methods on that object. 3. Tests should only have to use the object defined in 1. 4. Formalize the patterns we've already established in how we name reference files. 5. Make adding new reference files easy and obvious. Right now, we can only support reference tensors by timestamp with a generic approach. I think we should try to make that more an explicit pattern based on the pts value, but I'm not sure exactly how to do that right now. That will probably require changing some of our current reference file names. Also in the future, the reference file *generation* should probably use these definitions as well. That will ensure we keep everything consistent. Differential Revision: D59161329
- Loading branch information
1 parent
faf73b0
commit 9343787
Showing
4 changed files
with
186 additions
and
109 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.