Skip to content

Commit bb5c915

Browse files
committed
Make it more obvious old sampler is deprecated
1 parent 340bd77 commit bb5c915

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/torchcodec/_samplers/video_clip_sampler.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ class IndexBasedSamplerArgs(SamplerArgs):
105105
sample_step: int = 1
106106

107107

108-
class VideoClipSampler(nn.Module):
108+
class DEPRECATED_VideoClipSampler(nn.Module):
109109
"""
110110
VideoClipSampler will do video clip sampling with given video args and sampler args.
111111
The video args contains video related information, frames_per_clip, dimensions etc.

test/test_video_clip_sampler.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@
44
import pytest
55
import torch
66
from torchcodec._samplers import (
7+
DEPRECATED_VideoClipSampler,
78
IndexBasedSamplerArgs,
89
TimeBasedSamplerArgs,
910
VideoArgs,
10-
VideoClipSampler,
1111
)
1212

1313
from .utils import NASA_VIDEO
@@ -34,7 +34,7 @@ def test_sampler(sampler_args):
3434
torch.manual_seed(0)
3535
desired_width, desired_height = 320, 240
3636
video_args = VideoArgs(desired_width=desired_width, desired_height=desired_height)
37-
sampler = VideoClipSampler(video_args, sampler_args)
37+
sampler = DEPRECATED_VideoClipSampler(video_args, sampler_args)
3838
clips = sampler(NASA_VIDEO.to_tensor())
3939
assert len(clips) == sampler_args.clips_per_video
4040
clip = clips[0]

0 commit comments

Comments
 (0)