diff --git a/flash/image/detection/model.py b/flash/image/detection/model.py index 20b238aecb..097bff8917 100644 --- a/flash/image/detection/model.py +++ b/flash/image/detection/model.py @@ -94,7 +94,7 @@ def __init__( ): if not _IMAGE_AVAILABLE: - raise ModuleNotFoundError("Please, pip install . '[image]'") + raise ModuleNotFoundError("Please, pip install 'lightning-flash[image]'") self.save_hyperparameters() diff --git a/flash/image/embedding/model.py b/flash/image/embedding/model.py index 3993d62ede..3fa3df69db 100644 --- a/flash/image/embedding/model.py +++ b/flash/image/embedding/model.py @@ -60,7 +60,7 @@ def __init__( pooling_fn: Callable = torch.max ): if not _IMAGE_AVAILABLE: - raise ModuleNotFoundError("Please, pip install -e '.[image]'") + raise ModuleNotFoundError("Please, pip install 'lightning-flash[image]'") super().__init__( model=None, diff --git a/flash/image/segmentation/data.py b/flash/image/segmentation/data.py index 4990fc59e9..11cbd32adb 100644 --- a/flash/image/segmentation/data.py +++ b/flash/image/segmentation/data.py @@ -80,7 +80,7 @@ class SemanticSegmentationPathsDataSource(PathsDataSource): def __init__(self): if not _IMAGE_AVAILABLE: - raise ModuleNotFoundError("Please, pip install -e '.[image]'") + raise ModuleNotFoundError("Please, pip install 'lightning-flash[image]'") super().__init__(IMG_EXTENSIONS) def load_data(self, data: Union[Tuple[str, str], Tuple[List[str], List[str]]], @@ -172,7 +172,7 @@ def __init__( image_size: A tuple with the expected output image size. """ if not _IMAGE_AVAILABLE: - raise ModuleNotFoundError("Please, pip install -e '.[image]'") + raise ModuleNotFoundError("Please, pip install 'lightning-flash[image]'") self.image_size = image_size self.num_classes = num_classes if num_classes: diff --git a/flash/image/segmentation/model.py b/flash/image/segmentation/model.py index fca0a5f143..b0a298a8cc 100644 --- a/flash/image/segmentation/model.py +++ b/flash/image/segmentation/model.py @@ -86,7 +86,7 @@ def __init__( ) -> None: if isinstance(backbone, str) and (not _TORCHVISION_AVAILABLE or not _TIMM_AVAILABLE): - raise ModuleNotFoundError("Please, pip install -e '.[image]'") + raise ModuleNotFoundError("Please, pip install 'lightning-flash[image]'") if metrics is None: metrics = IoU(num_classes=num_classes) diff --git a/flash/image/style_transfer/model.py b/flash/image/style_transfer/model.py index c285d2c297..882288476f 100644 --- a/flash/image/style_transfer/model.py +++ b/flash/image/style_transfer/model.py @@ -94,7 +94,7 @@ def __init__( ): if not _IMAGE_STLYE_TRANSFER: - raise ModuleNotFoundError("Please, pip install -e '.[image_style_transfer]'") + raise ModuleNotFoundError("Please, pip install 'lightning-flash[image_style_transfer]'") self.save_hyperparameters(ignore="style_image") diff --git a/flash/tabular/classification/model.py b/flash/tabular/classification/model.py index 7483f05c66..57c026bf88 100644 --- a/flash/tabular/classification/model.py +++ b/flash/tabular/classification/model.py @@ -57,7 +57,7 @@ def __init__( **tabnet_kwargs, ): if not _TABULAR_AVAILABLE: - raise ModuleNotFoundError("Please, pip install -e '.[tabular]'") + raise ModuleNotFoundError("Please, pip install 'lightning-flash[tabular]'") self.save_hyperparameters() diff --git a/flash/text/classification/data.py b/flash/text/classification/data.py index 249af45105..eec01cff22 100644 --- a/flash/text/classification/data.py +++ b/flash/text/classification/data.py @@ -36,7 +36,7 @@ def __init__(self, backbone: str, max_length: int = 128): super().__init__() if not _TEXT_AVAILABLE: - raise ModuleNotFoundError("Please, pip install -e '.[text]'") + raise ModuleNotFoundError("Please, pip install 'lightning-flash[text]'") self.backbone = backbone self.tokenizer = AutoTokenizer.from_pretrained(backbone, use_fast=True) @@ -203,7 +203,7 @@ def __init__( ): if not _TEXT_AVAILABLE: - raise ModuleNotFoundError("Please, pip install -e '.[text]'") + raise ModuleNotFoundError("Please, pip install 'lightning-flash[text]'") self.backbone = backbone self.max_length = max_length diff --git a/flash/text/classification/model.py b/flash/text/classification/model.py index d799f5ee9e..e5a2667fe1 100644 --- a/flash/text/classification/model.py +++ b/flash/text/classification/model.py @@ -50,7 +50,7 @@ def __init__( serializer: Optional[Union[Serializer, Mapping[str, Serializer]]] = None, ): if not _TEXT_AVAILABLE: - raise ModuleNotFoundError("Please, pip install -e '.[text]'") + raise ModuleNotFoundError("Please, pip install 'lightning-flash[text]'") self.save_hyperparameters() diff --git a/flash/text/seq2seq/core/data.py b/flash/text/seq2seq/core/data.py index 28deb8d987..3d673edafe 100644 --- a/flash/text/seq2seq/core/data.py +++ b/flash/text/seq2seq/core/data.py @@ -43,7 +43,7 @@ def __init__( super().__init__() if not _TEXT_AVAILABLE: - raise ModuleNotFoundError("Please, pip install -e '.[text]'") + raise ModuleNotFoundError("Please, pip install 'lightning-flash[text]'") self.backbone = backbone self.tokenizer = AutoTokenizer.from_pretrained(self.backbone, use_fast=True) @@ -236,7 +236,7 @@ def __init__( self.padding = padding if not _TEXT_AVAILABLE: - raise ModuleNotFoundError("Please, pip install -e '.[text]'") + raise ModuleNotFoundError("Please, pip install 'lightning-flash[text]'") super().__init__( train_transform=train_transform, @@ -292,7 +292,7 @@ def __init__(self): super().__init__() if not _TEXT_AVAILABLE: - raise ModuleNotFoundError("Please, pip install -e '.[text]'") + raise ModuleNotFoundError("Please, pip install 'lightning-flash[text]'") self._backbone = None self._tokenizer = None diff --git a/flash/text/seq2seq/core/model.py b/flash/text/seq2seq/core/model.py index bb51772290..85430b49ef 100644 --- a/flash/text/seq2seq/core/model.py +++ b/flash/text/seq2seq/core/model.py @@ -66,7 +66,7 @@ def __init__( num_beams: Optional[int] = None, ): if not _TEXT_AVAILABLE: - raise ModuleNotFoundError("Please, pip install -e '.[text]'") + raise ModuleNotFoundError("Please, pip install 'lightning-flash[text]'") os.environ["TOKENIZERS_PARALLELISM"] = "TRUE" # disable HF thousand warnings diff --git a/flash/text/seq2seq/summarization/metric.py b/flash/text/seq2seq/summarization/metric.py index d491069026..1faef20918 100644 --- a/flash/text/seq2seq/summarization/metric.py +++ b/flash/text/seq2seq/summarization/metric.py @@ -60,7 +60,7 @@ def __init__( ): super().__init__() if not _TEXT_AVAILABLE: - raise ModuleNotFoundError("Please, pip install -e '.[text]'") + raise ModuleNotFoundError("Please, pip install 'lightning-flash[text]'") self.rouge_newline_sep = rouge_newline_sep self.rouge_keys = rouge_keys