Skip to content
This repository has been archived by the owner on Oct 9, 2023. It is now read-only.

Commit

Permalink
Enable BAAL tests (#1169)
Browse files Browse the repository at this point in the history
  • Loading branch information
ethanwharris authored Feb 14, 2022
1 parent 018b349 commit 3c84e94
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion flash/image/classification/integrations/baal/loop.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def __init__(self, label_epoch_frequency: int, inference_iteration: int = 2, sho
Example::
while unlabelled data or budget critera not reached:
while unlabelled data or budget criteria not reached:
if labelled data
trainer.fit(model, labelled data)
Expand Down
6 changes: 3 additions & 3 deletions tests/image/classification/test_active_learning.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
from torch.utils.data import SequentialSampler

import flash
from flash.core.utilities.imports import _BAAL_AVAILABLE, _IMAGE_TESTING
from flash.core.utilities.imports import _BAAL_AVAILABLE, _IMAGE_AVAILABLE
from flash.image import ImageClassificationData, ImageClassifier
from flash.image.classification.integrations.baal import ActiveLearningDataModule, ActiveLearningLoop
from tests.image.classification.test_data import _rand_image
Expand Down Expand Up @@ -61,7 +61,7 @@ def simple_datamodule(tmpdir):
return dm


@pytest.mark.skipif(not (_IMAGE_TESTING and _BAAL_AVAILABLE), reason="image and baal libraries aren't installed.")
@pytest.mark.skipif(not (_IMAGE_AVAILABLE and _BAAL_AVAILABLE), reason="image and baal libraries aren't installed.")
@pytest.mark.parametrize("initial_num_labels, query_size", [(0, 5), (5, 5)])
def test_active_learning_training(simple_datamodule, initial_num_labels, query_size):
seed_everything(42)
Expand Down Expand Up @@ -123,7 +123,7 @@ def test_active_learning_training(simple_datamodule, initial_num_labels, query_s
assert len(active_learning_dm.val_dataloader()) == 5


@pytest.mark.skipif(not (_IMAGE_TESTING and _BAAL_AVAILABLE), reason="image and baal libraries aren't installed.")
@pytest.mark.skipif(not (_IMAGE_AVAILABLE and _BAAL_AVAILABLE), reason="image and baal libraries aren't installed.")
def test_no_validation_loop(simple_datamodule):
active_learning_dm = ActiveLearningDataModule(
simple_datamodule,
Expand Down

0 comments on commit 3c84e94

Please sign in to comment.