"...git@developer.sourcefind.cn:wangsen/paddle_dbnet.git" did not exist on "683c86edb376af8914300ce508d4da4ae1c7f2a5"
Unverified Commit 0b0dd977 authored by Yih-Dar's avatar Yih-Dar Committed by GitHub
Browse files

Update expected values in constrained beam search tests (#17887)



* fix
Co-authored-by: default avatarydshieh <ydshieh@users.noreply.github.com>
parent e02037b3
......@@ -2510,8 +2510,8 @@ class GenerationIntegrationTests(unittest.TestCase):
self.assertListEqual(
generated_text,
[
"The soldiers were not prepared and didn't know how big the big weapons would be, so they scared them"
" off. They had no idea what to do",
"The soldiers were not prepared and didn't know what to do. They had no idea how they would react if"
" the enemy attacked them, big weapons scared"
],
)
......@@ -2549,8 +2549,9 @@ class GenerationIntegrationTests(unittest.TestCase):
self.assertListEqual(
generated_text,
[
"The soldiers, who were all scared and screaming at each other as they tried to get out of the",
"The child was taken to a local hospital where she screamed and scared for her life, police said.",
"The soldiers, who had been stationed at the base for more than a year before being evacuated"
" screaming scared",
"The child was taken to a local hospital where he died.\n 'I don't think screaming scared",
],
)
......@@ -2585,8 +2586,9 @@ class GenerationIntegrationTests(unittest.TestCase):
self.assertListEqual(
generated_text,
[
"The soldiers, who were all scared and screaming at each other as they tried to get out of the",
"The child was taken to a local hospital where she screamed and scared for her life, police said.",
"The soldiers, who had been stationed at the base for more than a year before being evacuated"
" screaming scared",
"The child was taken to a local hospital where he died.\n 'I don't think screaming scared",
],
)
......@@ -2612,7 +2614,7 @@ class GenerationIntegrationTests(unittest.TestCase):
outputs = tokenizer.batch_decode(outputs, skip_special_tokens=True)
self.assertListEqual(outputs, ["Wie alter sind Sie?"])
self.assertListEqual(outputs, ["Wie alt sind Sie?"])
@slow
def test_constrained_beam_search_example_integration(self):
......@@ -2656,7 +2658,7 @@ class GenerationIntegrationTests(unittest.TestCase):
)
outputs = tokenizer.batch_decode(outputs, skip_special_tokens=True)
self.assertListEqual(outputs, ["Wie alter sind Sie?"])
self.assertListEqual(outputs, ["Wie alt sind Sie?"])
def test_constrained_beam_search_mixin_type_checks(self):
tokenizer = AutoTokenizer.from_pretrained("patrickvonplaten/t5-tiny-random")
......
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