Skip to content

Commit 571e96c

Browse files
committed
can't make it a Literal
1 parent 6dc044c commit 571e96c

File tree

2 files changed

+1
-3
lines changed

2 files changed

+1
-3
lines changed

torchvision/transforms/v2/_meta.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ class ClampBoundingBoxes(Transform):
3434
3535
"""
3636

37-
# TODOBB consider "auto" to be a Literal, make sur torchscript is still happy
3837
def __init__(self, clamping_mode: Union[CLAMPING_MODE_TYPE, str] = "auto") -> None:
3938
super().__init__()
4039
self.clamping_mode = clamping_mode

torchvision/tv_tensors/_bounding_boxes.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,7 @@ def is_rotated_bounding_format(format: BoundingBoxFormat | str) -> bool:
5353
raise ValueError(f"format should be str or BoundingBoxFormat, got {type(format)}")
5454

5555

56-
# TODOBB consider making this a Literal instead. Tried briefly and got
57-
# torchscript errors, leaving to str for now.
56+
# This should ideally be a Literal, but torchscript fails.
5857
CLAMPING_MODE_TYPE = Optional[str]
5958

6059
# TODOBB All docs. Add any new API to rst files, add tutorial[s].

0 commit comments

Comments
 (0)