Skip to content

Commit 105c77f

Browse files
committed
Update conversion arg comment
1 parent 9b4186a commit 105c77f

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/torchcodec/decoders/_video_decoder.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -454,9 +454,9 @@ def _convert_to_decoder_transforms(
454454
transforms: Squence of transform objects. The objects can be one of two
455455
types:
456456
1. torchcodec.transforms.DecoderTransform
457-
2. torchvision.transforms.v2.Transform
458-
Our type annotation only mentions the first type so that we don't
459-
have a hard dependency on TorchVision.
457+
2. torchvision.transforms.v2.Transform, but our type annotation
458+
only mentions its base, nn.Module. We don't want to take a
459+
hard dependency on TorchVision.
460460
461461
Returns:
462462
List of DecoderTransform objects.
@@ -501,9 +501,9 @@ def _make_transform_specs(
501501
transforms: Optional sequence of transform objects. The objects can be
502502
one of two types:
503503
1. torchcodec.transforms.DecoderTransform
504-
2. torchvision.transforms.v2.Transform
505-
Our type annotation only mentions the first type so that we don't
506-
have a hard dependency on TorchVision.
504+
2. torchvision.transforms.v2.Transform, but our type annotation
505+
only mentions its base, nn.Module. We don't want to take a
506+
hard dependency on TorchVision.
507507
508508
Returns:
509509
String of transforms in the format the core API expects: transform

0 commit comments

Comments
 (0)