"...git@developer.sourcefind.cn:chenpangpang/transformers.git" did not exist on "d25e25ee2b63ebfcd099deb689a5a7272574a10f"
Unverified Commit 280db2e3 authored by Yih-Dar's avatar Yih-Dar Committed by GitHub
Browse files

Fix `test_dbmdz_english` by updating expected values (#18482)


Co-authored-by: default avatarydshieh <ydshieh@users.noreply.github.com>
parent 5cd40323
...@@ -284,9 +284,9 @@ class TokenClassificationPipelineTests(unittest.TestCase, metaclass=PipelineTest ...@@ -284,9 +284,9 @@ class TokenClassificationPipelineTests(unittest.TestCase, metaclass=PipelineTest
self.assertEqual( self.assertEqual(
nested_simplify(output), nested_simplify(output),
[ [
{"entity": "I-PER", "score": 0.997, "word": "En", "start": 0, "end": 2, "index": 1}, {"entity": "I-PER", "score": 0.998, "word": "En", "start": 0, "end": 2, "index": 1},
{"entity": "I-PER", "score": 0.996, "word": "##zo", "start": 2, "end": 4, "index": 2}, {"entity": "I-PER", "score": 0.997, "word": "##zo", "start": 2, "end": 4, "index": 2},
{"entity": "I-ORG", "score": 0.999, "word": "UN", "start": 22, "end": 24, "index": 7}, {"entity": "I-ORG", "score": 0.999, "word": "UN", "start": 18, "end": 20, "index": 6},
], ],
) )
...@@ -295,8 +295,8 @@ class TokenClassificationPipelineTests(unittest.TestCase, metaclass=PipelineTest ...@@ -295,8 +295,8 @@ class TokenClassificationPipelineTests(unittest.TestCase, metaclass=PipelineTest
self.assertEqual( self.assertEqual(
nested_simplify(output), nested_simplify(output),
[ [
{"entity_group": "PER", "score": 0.996, "word": "Enzo", "start": 0, "end": 4}, {"entity_group": "PER", "score": 0.997, "word": "Enzo", "start": 0, "end": 4},
{"entity_group": "ORG", "score": 0.999, "word": "UN", "start": 22, "end": 24}, {"entity_group": "ORG", "score": 0.999, "word": "UN", "start": 18, "end": 20},
], ],
) )
...@@ -305,8 +305,8 @@ class TokenClassificationPipelineTests(unittest.TestCase, metaclass=PipelineTest ...@@ -305,8 +305,8 @@ class TokenClassificationPipelineTests(unittest.TestCase, metaclass=PipelineTest
self.assertEqual( self.assertEqual(
nested_simplify(output[:3]), nested_simplify(output[:3]),
[ [
{"entity_group": "PER", "score": 0.997, "word": "Enzo", "start": 0, "end": 4}, {"entity_group": "PER", "score": 0.998, "word": "Enzo", "start": 0, "end": 4},
{"entity_group": "ORG", "score": 0.999, "word": "UN", "start": 22, "end": 24}, {"entity_group": "ORG", "score": 0.999, "word": "UN", "start": 18, "end": 20},
], ],
) )
...@@ -315,8 +315,8 @@ class TokenClassificationPipelineTests(unittest.TestCase, metaclass=PipelineTest ...@@ -315,8 +315,8 @@ class TokenClassificationPipelineTests(unittest.TestCase, metaclass=PipelineTest
self.assertEqual( self.assertEqual(
nested_simplify(output[:3]), nested_simplify(output[:3]),
[ [
{"entity_group": "PER", "score": 0.997, "word": "Enzo", "start": 0, "end": 4}, {"entity_group": "PER", "score": 0.998, "word": "Enzo", "start": 0, "end": 4},
{"entity_group": "ORG", "score": 0.999, "word": "UN", "start": 22, "end": 24}, {"entity_group": "ORG", "score": 0.999, "word": "UN", "start": 18, "end": 20},
], ],
) )
...@@ -325,8 +325,8 @@ class TokenClassificationPipelineTests(unittest.TestCase, metaclass=PipelineTest ...@@ -325,8 +325,8 @@ class TokenClassificationPipelineTests(unittest.TestCase, metaclass=PipelineTest
self.assertEqual( self.assertEqual(
nested_simplify(output), nested_simplify(output),
[ [
{"entity_group": "PER", "score": 0.996, "word": "Enzo", "start": 0, "end": 4}, {"entity_group": "PER", "score": 0.997, "word": "Enzo", "start": 0, "end": 4},
{"entity_group": "ORG", "score": 0.999, "word": "UN", "start": 22, "end": 24}, {"entity_group": "ORG", "score": 0.999, "word": "UN", "start": 18, "end": 20},
], ],
) )
......
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