Skip to content

Commit 6de813b

Browse files
authored
Merge branch 'main' into please_dont_modify_this_branch_unless_you_are_just_merging_with_main__
2 parents 47e88d4 + 8ea4772 commit 6de813b

File tree

7 files changed

+17
-7
lines changed

7 files changed

+17
-7
lines changed

packaging/post_build_script.sh

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
#!/bin/bash
2-
LD_LIBRARY_PATH="/usr/local/lib:$CUDA_HOME/lib64:$LD_LIBRARY_PATH" python packaging/wheel/relocate.py
2+
set -euxo pipefail
3+
4+
if [ -n "${CUDA_HOME:-}" ]; then
5+
LD_LIBRARY_PATH="/usr/local/lib:${CUDA_HOME}/lib64:${LD_LIBRARY_PATH}"
6+
fi
7+
8+
python packaging/wheel/relocate.py
39

410
if [[ "$(uname)" == "Linux" && "$(uname -m)" != "aarch64" ]]; then
511
extra_decoders_channel="--pre --index-url https://download.pytorch.org/whl/nightly/cpu"

packaging/pre_build_script.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ else
3636
conda install libwebp -y
3737
conda install libjpeg-turbo -c pytorch
3838
yum install -y freetype gnutls
39-
pip install auditwheel
39+
pip install "auditwheel<6.3.0"
4040
fi
4141

4242
pip install numpy pyyaml future ninja

packaging/wheel/relocate.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,10 @@
1515

1616
# Third party imports
1717
if sys.platform == "linux":
18-
from auditwheel.lddtree import lddtree
18+
try:
19+
from auditwheel.lddtree import lddtree
20+
except ImportError:
21+
from auditwheel import lddtree
1922

2023

2124
ALLOWLIST = {

torchvision/models/optical_flow/raft.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -486,7 +486,7 @@ def forward(self, image1, image2, num_flow_updates: int = 12):
486486
batch_size, _, h, w = image1.shape
487487
if (h, w) != image2.shape[-2:]:
488488
raise ValueError(f"input images should have the same shape, instead got ({h}, {w}) != {image2.shape[-2:]}")
489-
if not (h % 8 == 0) and (w % 8 == 0):
489+
if not ((h % 8 == 0) and (w % 8 == 0)):
490490
raise ValueError(f"input image H and W should be divisible by 8, instead got {h} (h) and {w} (w)")
491491

492492
fmaps = self.feature_encoder(torch.cat([image1, image2], dim=0))

torchvision/ops/boxes.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,8 @@ def batched_nms(
7878
_log_api_usage_once(batched_nms)
7979
# Benchmarks that drove the following thresholds are at
8080
# https://github.com/pytorch/vision/issues/1311#issuecomment-781329339
81-
if boxes.numel() > (4000 if boxes.device.type == "cpu" else 20000) and not torchvision._is_tracing():
81+
# and https://github.com/pytorch/vision/pull/8925
82+
if boxes.numel() > (4000 if boxes.device.type == "cpu" else 100_000) and not torchvision._is_tracing():
8283
return _batched_nms_vanilla(boxes, scores, idxs, iou_threshold)
8384
else:
8485
return _batched_nms_coordinate_trick(boxes, scores, idxs, iou_threshold)

torchvision/transforms/v2/_color.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ def _check_input(
134134
raise TypeError(f"{name}={value} should be a single number or a sequence with length 2.")
135135

136136
if not bound[0] <= value[0] <= value[1] <= bound[1]:
137-
raise ValueError(f"{name} values should be between {bound}, but got {value}.")
137+
raise ValueError(f"{name} values should be between {bound} and increasing, but got {value}.")
138138

139139
return None if value[0] == value[1] == center else (float(value[0]), float(value[1]))
140140

torchvision/transforms/v2/_geometry.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -567,7 +567,7 @@ class RandomRotation(Transform):
567567
Args:
568568
degrees (sequence or number): Range of degrees to select from.
569569
If degrees is a number instead of sequence like (min, max), the range of degrees
570-
will be (-degrees, +degrees).
570+
will be [-degrees, +degrees].
571571
interpolation (InterpolationMode, optional): Desired interpolation enum defined by
572572
:class:`torchvision.transforms.InterpolationMode`. Default is ``InterpolationMode.NEAREST``.
573573
If input is Tensor, only ``InterpolationMode.NEAREST``, ``InterpolationMode.BILINEAR`` are supported.

0 commit comments

Comments
 (0)