-
Notifications
You must be signed in to change notification settings - Fork 213
change Module not found error to a more verbose pip install command #347
change Module not found error to a more verbose pip install command #347
Conversation
@deepseek-eoghan Thank you for submitting this PR! LGTM! Could you also update all occurrences in the codebase? $ grep -rn "pip install" flash
flash/tabular/classification/model.py:60: raise ModuleNotFoundError("Please, pip install -e '.[tabular]'")
flash/video/classification/data.py:137: raise ModuleNotFoundError("Please, run `pip install pytorchvideo`.")
flash/image/style_transfer/model.py:97: raise ModuleNotFoundError("Please, pip install -e '.[image_style_transfer]'")
flash/image/segmentation/model.py:89: raise ModuleNotFoundError("Please, pip install -e '.[image]'")
flash/image/segmentation/data.py:83: raise ModuleNotFoundError("Please, pip install -e '.[image]'")
flash/image/segmentation/data.py:175: raise ModuleNotFoundError("Please, pip install -e '.[image]'")
flash/image/segmentation/data.py:404: raise MisconfigurationException("You need matplotlib to visualise. Please, pip install matplotlib")
flash/image/embedding/model.py:63: raise ModuleNotFoundError("Please, pip install -e '.[image]'")
flash/image/detection/model.py:97: raise ModuleNotFoundError("Please, pip install . '[image]'")
flash/image/classification/data.py:120: raise MisconfigurationException("You need matplotlib to visualise. Please, pip install matplotlib")
flash/text/seq2seq/core/model.py:69: raise ModuleNotFoundError("Please, pip install -e '.[text]'")
flash/text/seq2seq/core/data.py:46: raise ModuleNotFoundError("Please, pip install -e '.[text]'")
flash/text/seq2seq/core/data.py:193: raise ModuleNotFoundError("Please, pip install -e '.[text]'")
flash/text/seq2seq/summarization/utils.py:27: assert nltk, "nltk must be installed to separate newlines between sentences. (pip install nltk)"
flash/text/seq2seq/summarization/data.py:30: raise ModuleNotFoundError("Please, pip install -e '.[text]'")
flash/text/seq2seq/summarization/metric.py:63: raise ModuleNotFoundError("Please, pip install -e '.[text]'")
flash/text/classification/model.py:53: raise ModuleNotFoundError("Please, pip install -e '.[text]'")
flash/text/classification/data.py:39: raise ModuleNotFoundError("Please, pip install -e '.[text]'")
flash/text/classification/data.py:160: raise ModuleNotFoundError("Please, pip install -e '.[text]'") |
I've updated those listed above @akihironitta can the -e flag be removed from |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work @deepseek-eoghan 😃 Yeah, you can drop the -e
too. You'd only use it when installing for dev purposes.
Codecov Report
@@ Coverage Diff @@
## master #347 +/- ##
=======================================
Coverage 88.82% 88.82%
=======================================
Files 80 80
Lines 4143 4143
=======================================
Hits 3680 3680
Misses 463 463
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@deepseek-eoghan LGTM!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 😃
What does this PR do?
Change if not _IMAGE_AVAILABLE: ModuleNotFoundError message in flash.image.detection.model.py line 97.
From:
raise ModuleNotFoundError("Please, pip install . [image]")
To:
raise ModuleNotFoundError("Please, pip install lightning-flash[image]")
Fixes # (issue)
Before submitting
PR review