pytorch / pytorch/vision

Using Kinetics400 from references raises a deprecation warning

Open
#5,787 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug module: datasets module: video
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.