Loading .github/workflows/test.yml +0 −1 Original line number Diff line number Diff line Loading @@ -87,7 +87,6 @@ jobs: pip install --upgrade flake8 setuptools wheel twine pip install -r requirements.txt pip install -r requirements-test.txt pip install -r requirements-zoo.txt - name: Test the basic environment shell: bash run: | Loading test/clustering/test_lpips.py +1 −9 Original line number Diff line number Diff line Loading @@ -2,15 +2,13 @@ import glob import os.path import random import numpy as np import pytest from PIL import Image from hbutils.random import keep_global_state, global_seed from hbutils.testing import tmatrix, disable_output from sklearn.metrics import adjusted_rand_score from imgutils.clustering.lpips import _image_encode, lpips_difference, lpips_clustering from zoo.lpips.dispatch import _TRANSFORM from imgutils.clustering.lpips import lpips_difference, lpips_clustering from ..testings import get_testfile Loading Loading @@ -41,12 +39,6 @@ def sampling_from_dataset(seed): @pytest.mark.unittest class TestClusteringLpips: @pytest.mark.parametrize(*tmatrix({ 'filename': ['6124220.jpg', '6125785.png', '6125901.jpg'], })) def test_image_encode(self, filename): image = Image.open(get_testfile(filename)) assert np.isclose(_image_encode(image), _TRANSFORM(image).numpy()).all() @pytest.mark.parametrize(*tmatrix({ 'f1': ['6124220.jpg', '6125785.png', '6125901.jpg'], Loading Loading
.github/workflows/test.yml +0 −1 Original line number Diff line number Diff line Loading @@ -87,7 +87,6 @@ jobs: pip install --upgrade flake8 setuptools wheel twine pip install -r requirements.txt pip install -r requirements-test.txt pip install -r requirements-zoo.txt - name: Test the basic environment shell: bash run: | Loading
test/clustering/test_lpips.py +1 −9 Original line number Diff line number Diff line Loading @@ -2,15 +2,13 @@ import glob import os.path import random import numpy as np import pytest from PIL import Image from hbutils.random import keep_global_state, global_seed from hbutils.testing import tmatrix, disable_output from sklearn.metrics import adjusted_rand_score from imgutils.clustering.lpips import _image_encode, lpips_difference, lpips_clustering from zoo.lpips.dispatch import _TRANSFORM from imgutils.clustering.lpips import lpips_difference, lpips_clustering from ..testings import get_testfile Loading Loading @@ -41,12 +39,6 @@ def sampling_from_dataset(seed): @pytest.mark.unittest class TestClusteringLpips: @pytest.mark.parametrize(*tmatrix({ 'filename': ['6124220.jpg', '6125785.png', '6125901.jpg'], })) def test_image_encode(self, filename): image = Image.open(get_testfile(filename)) assert np.isclose(_image_encode(image), _TRANSFORM(image).numpy()).all() @pytest.mark.parametrize(*tmatrix({ 'f1': ['6124220.jpg', '6125785.png', '6125901.jpg'], Loading