Skip to content

Commit

Permalink
Update test
Browse files Browse the repository at this point in the history
  • Loading branch information
goodsong81 committed Oct 17, 2024
1 parent 032acb6 commit 2aff5bb
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions tests/integration/api/test_augmentation.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,13 @@ def _test_aug_cls(
for switches in itertools.product([True, False], repeat=len(configurable_augs)):
# Configure on/off
for aug_name, switch in zip(configurable_augs, switches):
aug_found = False
for aug_config in train_config["transforms"]:
if aug_name in aug_config["class_path"]:
aug_config["enable"] = switch
aug_found = True
break
assert aug_found, f"{aug_name} not found in {recipe}"
# Create dataset
dataset = OTXDatasetFactory.create(
task=task,
Expand All @@ -68,7 +71,9 @@ def _test_aug_cls(
assert img_shape == data.img_info.img_shape


CLS_RECIPES = [recipe for recipe in pytest.RECIPE_LIST if "_cls" in recipe and "semi" not in recipe]
CLS_RECIPES = [
recipe for recipe in pytest.RECIPE_LIST if "_cls" in recipe and "semi" not in recipe and "tv_" not in recipe
]


@pytest.mark.parametrize(
Expand All @@ -87,4 +92,4 @@ def test_aug_cls(
"GaussianBlur",
"GaussianNoise",
]
_test_aug_cls(recipe, fxt_target_dataset_per_task, configurable_augs)

0 comments on commit 2aff5bb

Please sign in to comment.