Skip to content

Commit 59b87a8

Browse files
committed
Indicate deprecation in comment
1 parent bb5c915 commit 59b87a8

File tree

1 file changed

+3
-16
lines changed

1 file changed

+3
-16
lines changed

src/torchcodec/_samplers/video_clip_sampler.py

Lines changed: 3 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -107,23 +107,10 @@ class IndexBasedSamplerArgs(SamplerArgs):
107107

108108
class DEPRECATED_VideoClipSampler(nn.Module):
109109
"""
110-
VideoClipSampler will do video clip sampling with given video args and sampler args.
111-
The video args contains video related information, frames_per_clip, dimensions etc.
112-
The sampler args can be either time-based or index-based, it will be used to decide clip start time pts or index.
113-
ClipSampling support, random, uniform, periodic, target, keyframe sampling etc.
110+
DEPRECATED: Do not use. The supported samplers are in `torchcodec.samplers`. See:
114111
115-
Args:
116-
video_args (`VideoArgs`): The video args
117-
sampler_args (`SamplerArgs`): The sampler args. Can be TimeBasedSamplerArgs or IndexBasedSamplerArgs
118-
decoder_args (`DecoderArgs`): Decoder args contain value needs for decoder, for example, thread count
119-
120-
Example:
121-
>>> video_args = VideoArgs(desired_width=224, desired_height=224)
122-
>>> time_based_sampler_args = TimeBasedSamplerArgs(sampler_type="random", clips_per_video=1, frames_per_clip=4)
123-
>>> video_decoder_args = DecoderArgs(num_threads=1)
124-
>>> video_clip_sampler = VideoClipSampler(video_args, time_based_sampler_args, decoder_args)
125-
>>> clips = video_clip_sampler(video_data)
126-
clips now contains a list of clip, where clip is a list of frame tensors, each tensor represents a frame image.
112+
* https://docs.pytorch.org/torchcodec/stable/api_ref_torchcodec.html
113+
* https://docs.pytorch.org/torchcodec/stable/generated_examples/decoding/sampling.html
127114
"""
128115

129116
def __init__(

0 commit comments

Comments
 (0)