Browse Source

[to #42322933] remove deepspeed and fariseq from requirments

master
zhangzhicheng.zzc 3 years ago
parent
commit
c35f8cb42b
4 changed files with 17 additions and 3 deletions
  1. +15
    -0
      modelscope/utils/error.py
  2. +2
    -0
      modelscope/utils/import_utils.py
  3. +0
    -1
      requirements/multi-modal.txt
  4. +0
    -2
      requirements/nlp.txt

+ 15
- 0
modelscope/utils/error.py View File

@@ -96,3 +96,18 @@ DECORD_IMPORT_ERROR = """
{0} requires the decord library but it was not found in your environment. You can install it with pip:
`pip install decord>=0.6.0`
"""

# docstyle-ignore
DEEPSPEED_IMPORT_ERROR = """
{0} requires the Deepspeed library but it was not found in your environment. Checkout the instructions on the
installation page: https://www.deepspeed.ai/tutorials/advanced-install/ and follow the ones that match your environment.
"""

# docstyle-ignore
FAIRSEQ_IMPORT_ERROR = """
{0} requires the fairseq library but it was not found in your environment.
You can install it with pip on linux:
`pip install fairseq`
On windows, please checkout the instructions on the
installation page: https://github.com/facebookresearch/fairseq and follow the ones that match your environment.
"""

+ 2
- 0
modelscope/utils/import_utils.py View File

@@ -290,6 +290,8 @@ REQUIREMENTS_MAAPING = OrderedDict([
('easyasr', (is_package_available('easyasr'), AUDIO_IMPORT_ERROR)),
('kwsbp', (is_package_available('kwsbp'), AUDIO_IMPORT_ERROR)),
('decord', (is_package_available('decord'), DECORD_IMPORT_ERROR)),
('deepspeed', (is_package_available('deepspeed'), DEEPSPEED_IMPORT_ERROR)),
('fairseq', (is_package_available('fairseq'), FAIRSEQ_IMPORT_ERROR)),
])

SYSTEM_PACKAGE = set(['os', 'sys', 'typing'])


+ 0
- 1
requirements/multi-modal.txt View File

@@ -1,4 +1,3 @@
fairseq
ftfy>=6.0.3
ofa>=0.0.2
pycocoevalcap>=1.2


+ 0
- 2
requirements/nlp.txt View File

@@ -1,6 +1,4 @@
deepspeed
en_core_web_sm>=2.3.5
fairseq>=0.10.2
jieba>=0.42.1
megatron_util
pai-easynlp


Loading…
Cancel
Save