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 = [
3737]
3838dependencies = [
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.
310312DEP002 = [
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 ]
Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments