Skip to content

Commit

Permalink
Deprecation fixes for test suite (#230)
Browse files Browse the repository at this point in the history
  • Loading branch information
mmuckley authored Nov 8, 2023
1 parent 3dea947 commit 4890509
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions neuralcompression/functional/_dense_image_warp.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ def _create_dense_warp_base_grid(
grid_y, grid_x = torch.meshgrid(
torch.linspace(-1, 1, dim1, dtype=dtype, device=device),
torch.linspace(-1, 1, dim2, dtype=dtype, device=device),
indexing="ij",
)

# for gridding we need to flip the order here
Expand Down
2 changes: 1 addition & 1 deletion tests/data/test_clic_2020_image.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def data(tmp_path):

directory.mkdir(parents=True)

n = int(rng.integers(1, 16, (1,)))
n = rng.integers(1, 16)

for index in range(n):
path = directory.joinpath(f"{index}.png")
Expand Down
2 changes: 1 addition & 1 deletion tests/data/test_div2k.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def div2k_datafolder(tmp_path: Path):

directory.mkdir(parents=True)

n = int(rng.integers(1, 16, (1,)))
n = rng.integers(1, 16)

images = []

Expand Down
2 changes: 1 addition & 1 deletion tests/data/test_open_images.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def write_folder_and_flist(base_dir: Path, subfolder: str):
directory = base_dir / subfolder
directory.mkdir(parents=True)

n = int(rng.integers(1, 16, (1,)))
n = rng.integers(1, 16)

images = []

Expand Down
2 changes: 1 addition & 1 deletion tests/metrics/test_calc_psnr.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import pytest
import torch
from torch import Tensor
from torchmetrics.functional import peak_signal_noise_ratio
from torchmetrics.functional.image import peak_signal_noise_ratio

from neuralcompression.metrics import calc_psnr, calc_psnr_numpy

Expand Down

0 comments on commit 4890509

Please sign in to comment.