Skip to content

Commit ae31ae0

Browse files
Merge branch 'main' into prep-release
2 parents 7909348 + 07629da commit ae31ae0

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

pyproject.toml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,10 @@ dynamic = [
3737
]
3838
dependencies = [
3939
"flask",
40+
# Pin numpy to avoid:
41+
# https://github.com/pytorch/pytorch/issues/128860
42+
# When we remove this, also remove the deptry ignore.
43+
"numpy<2.0.0; sys_platform=='win32'",
4044
"pillow",
4145
"piq",
4246
"pydantic-settings",
@@ -305,10 +309,13 @@ pep621_dev_dependency_groups = [
305309
]
306310

307311
[tool.deptry.per_rule_ignores]
308-
# tzdata is needed on Windows for zoneinfo to work.
309-
# See https://docs.python.org/3/library/zoneinfo.html#data-sources.
310312
DEP002 = [
313+
# tzdata is needed on Windows for zoneinfo to work.
314+
# See https://docs.python.org/3/library/zoneinfo.html#data-sources.
311315
"tzdata",
316+
# numpy is pinned to avoid:
317+
# https://github.com/pytorch/pytorch/issues/128860.
318+
"numpy",
312319
]
313320

314321
[tool.pyproject-fmt]

src/mock_vws/target_raters.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ def _get_brisque_target_tracking_rating(image_content: bytes) -> int:
3030
image_tensor = image_tensor.unsqueeze(0)
3131
try:
3232
brisque_score = piq.brisque(x=image_tensor, data_range=255)
33-
except AssertionError:
33+
except (AssertionError, IndexError):
3434
return 0
3535
return math.ceil(int(brisque_score.item()) / 20)
3636

0 commit comments

Comments
 (0)