Browse Source

[to #42322933] remove fasttext from nlp requirements

master
zhangzhicheng.zzc 3 years ago
parent
commit
7e7303a658
3 changed files with 11 additions and 2 deletions
  1. +9
    -0
      modelscope/utils/error.py
  2. +1
    -0
      modelscope/utils/import_utils.py
  3. +1
    -2
      requirements/nlp.txt

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

@@ -111,3 +111,12 @@ You can install it with pip on linux:
On windows, please checkout the instructions on the
installation page: https://github.com/facebookresearch/fairseq and follow the ones that match your environment.
"""

# docstyle-ignore
FASTTEXT_IMPORT_ERROR = """
{0} requires the fasttext library but it was not found in your environment.
You can install it with pip on linux or mac:
`pip install fasttext`
Or you can checkout the instructions on the
installation page: https://github.com/facebookresearch/fastText and follow the ones that match your environment.
"""

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

@@ -292,6 +292,7 @@ REQUIREMENTS_MAAPING = OrderedDict([
('decord', (is_package_available('decord'), DECORD_IMPORT_ERROR)),
('deepspeed', (is_package_available('deepspeed'), DEEPSPEED_IMPORT_ERROR)),
('fairseq', (is_package_available('fairseq'), FAIRSEQ_IMPORT_ERROR)),
('fasttext', (is_package_available('fasttext'), FASTTEXT_IMPORT_ERROR)),
])

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


+ 1
- 2
requirements/nlp.txt View File

@@ -1,5 +1,4 @@
en_core_web_sm>=2.3.5
fasttext
jieba>=0.42.1
megatron_util
pai-easynlp
@@ -14,4 +13,4 @@ spacy>=2.3.5
subword_nmt>=0.3.8
text2sql_lgesql
tokenizers
transformers
transformers>=4.12.0

Loading…
Cancel
Save