File tree Expand file tree Collapse file tree 2 files changed +10
-3
lines changed Expand file tree Collapse file tree 2 files changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -37,6 +37,10 @@ dynamic = [
37
37
]
38
38
dependencies = [
39
39
" 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'" ,
40
44
" pillow" ,
41
45
" piq" ,
42
46
" pydantic-settings" ,
@@ -305,10 +309,13 @@ pep621_dev_dependency_groups = [
305
309
]
306
310
307
311
[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.
310
312
DEP002 = [
313
+ # tzdata is needed on Windows for zoneinfo to work.
314
+ # See https://docs.python.org/3/library/zoneinfo.html#data-sources.
311
315
" tzdata" ,
316
+ # numpy is pinned to avoid:
317
+ # https://github.com/pytorch/pytorch/issues/128860.
318
+ " numpy" ,
312
319
]
313
320
314
321
[tool .pyproject-fmt ]
Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ def _get_brisque_target_tracking_rating(image_content: bytes) -> int:
30
30
image_tensor = image_tensor .unsqueeze (0 )
31
31
try :
32
32
brisque_score = piq .brisque (x = image_tensor , data_range = 255 )
33
- except AssertionError :
33
+ except ( AssertionError , IndexError ) :
34
34
return 0
35
35
return math .ceil (int (brisque_score .item ()) / 20 )
36
36
You can’t perform that action at this time.
0 commit comments