"web/git@developer.sourcefind.cn:chenpangpang/ComfyUI.git" did not exist on "cf4910a3a451ad9e2e5261749a5a44acdcf7bbec"
Unverified Commit ab42d748 authored by Sam Shleifer's avatar Sam Shleifer Committed by GitHub
Browse files

Fix bart base test (#6587)

parent 1529bf96
...@@ -440,8 +440,7 @@ class BartModelIntegrationTests(unittest.TestCase): ...@@ -440,8 +440,7 @@ class BartModelIntegrationTests(unittest.TestCase):
pbase = pipeline(task="fill-mask", model="facebook/bart-base") pbase = pipeline(task="fill-mask", model="facebook/bart-base")
src_text = [" I went to the <mask>."] src_text = [" I went to the <mask>."]
results = [x["token_str"] for x in pbase(src_text)] results = [x["token_str"] for x in pbase(src_text)]
expected_results = ["Ġbathroom", "Ġrestroom", "Ġhospital", "Ġkitchen", "Ġcar"] assert "Ġbathroom" in results
self.assertListEqual(results, expected_results)
@slow @slow
def test_bart_large_mask_filling(self): def test_bart_large_mask_filling(self):
......
...@@ -205,9 +205,9 @@ class TestMarian_MT_EN(MarianIntegrationTest): ...@@ -205,9 +205,9 @@ class TestMarian_MT_EN(MarianIntegrationTest):
self._assert_generated_batch_equal_expected() self._assert_generated_batch_equal_expected()
class TestMarian_eng_zho(MarianIntegrationTest): class TestMarian_en_zh(MarianIntegrationTest):
src = "eng" src = "en"
tgt = "zho" tgt = "zh"
src_text = ["My name is Wolfgang and I live in Berlin"] src_text = ["My name is Wolfgang and I live in Berlin"]
expected_text = ["我叫沃尔夫冈 我住在柏林"] expected_text = ["我叫沃尔夫冈 我住在柏林"]
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment