Using Kinetics400 from references raises a deprecation warning
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 17.9k
- Forks
- 7.3k
- Avg merge
- 1d 15h
- Merged PRs (30d)
- 13
Description
🐛 Describe the bug
Using Kinetics400 from references leads to a deprecation warning. The fastest way to reproduce:
torchrun --nproc_per_node=8 train.py --data-path /datasets01/kinetics/070618/ --train-dir=val_avi-480p --val-dir=val_avi-480p --batch-size=64 --sync-bn --test-only --weights R2Plus1D_18_Weights.DEFAULT --cache-dataset
./vision/torchvision/io/video.py:160: UserWarning: The pts_unit 'pts' gives wrong results and will be removed in a follow-up version. Please use pts_unit 'sec'.
warnings.warn(
It seems this is due to the following line:
https://github.com/pytorch/vision/blob/b7c59a086f4e45b8e5e799084e97cca775977a3b/torchvision/datasets/video_utils.py#L327
Which calls the method with the default parameter for pts_unit="pts" which is deprecated:
https://github.com/pytorch/vision/blob/b7c59a086f4e45b8e5e799084e97cca775977a3b/torchvision/io/video.py#L155-L163
If the specific option is deprecated, TorchVision shouldn't be using the feature.
Versions
Latest main branch
cc @pmeier @YosuaMichael @bjuncek
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in torchvision/datasets/video_utils.py at the Kinetics400 call around line 327, then read torchvision/io/video.py around lines 155-163 to understand the warning. Reproduce the issue with the provided torchrun command and verify that using Kinetics400 no longer emits the deprecated pts_unit warning.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, pytorch
- Domain
- computer-vision, data
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 38/100