Browse Source

fix

master
suluyan 3 years ago
parent
commit
767a8360c7
2 changed files with 2 additions and 3 deletions
  1. +0
    -1
      modelscope/utils/constant.py
  2. +2
    -2
      tests/pipelines/test_fill_mask.py

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

@@ -44,7 +44,6 @@ class Tasks(object):
text_generation = 'text-generation'
table_question_answering = 'table-question-answering'
feature_extraction = 'feature-extraction'
sentence_similarity = 'sentence-similarity'
fill_mask = 'fill-mask'
summarization = 'summarization'
question_answering = 'question-answering'


+ 2
- 2
tests/pipelines/test_fill_mask.py View File

@@ -35,7 +35,7 @@ class FillMaskTest(unittest.TestCase):
'[MASK]. Your [MASK] universe is just a mirror [MASK] of your story.'
}

@unittest.skipUnless(test_level() >= 1, 'skip test in current test level')
@unittest.skipUnless(test_level() >= 2, 'skip test in current test level')
def test_run_by_direct_model_download(self):
# sbert
for language in ['zh', 'en']:
@@ -115,7 +115,7 @@ class FillMaskTest(unittest.TestCase):
f'\nori_text: {self.ori_texts[language]}\ninput: {self.test_inputs[language]}\npipeline: '
f'{pipeline_ins(self.test_inputs[language])}\n')

@unittest.skipUnless(test_level() >= 0, 'skip test in current test level')
@unittest.skipUnless(test_level() >= 2, 'skip test in current test level')
def test_run_with_default_model(self):
pipeline_ins = pipeline(task=Tasks.fill_mask)
language = 'en'


Loading…
Cancel
Save