Skip to content

Commit b5ac6ca

Browse files
committed
skip doctest if torchvision missing
1 parent e7ef57f commit b5ac6ca

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/lightning/pytorch/callbacks/finetuning.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,13 @@
3131
import lightning.pytorch as pl
3232
from lightning.pytorch.callbacks.callback import Callback
3333
from lightning.pytorch.utilities.exceptions import MisconfigurationException
34+
from lightning.pytorch.utilities.imports import _TORCHVISION_AVAILABLE
3435
from lightning.pytorch.utilities.rank_zero import rank_zero_warn
3536

37+
if not _TORCHVISION_AVAILABLE:
38+
__doctest_skip__ = ["BackboneFinetuning"]
39+
40+
3641
log = logging.getLogger(__name__)
3742

3843

0 commit comments

Comments
 (0)