Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
chenpangpang
transformers
Commits
280db2e3
Unverified
Commit
280db2e3
authored
Aug 05, 2022
by
Yih-Dar
Committed by
GitHub
Aug 05, 2022
Browse files
Fix `test_dbmdz_english` by updating expected values (#18482)
Co-authored-by:
ydshieh
<
ydshieh@users.noreply.github.com
>
parent
5cd40323
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
11 deletions
+11
-11
tests/pipelines/test_pipelines_token_classification.py
tests/pipelines/test_pipelines_token_classification.py
+11
-11
No files found.
tests/pipelines/test_pipelines_token_classification.py
View file @
280db2e3
...
@@ -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.99
7
,
"word"
:
"En"
,
"start"
:
0
,
"end"
:
2
,
"index"
:
1
},
{
"entity"
:
"I-PER"
,
"score"
:
0.99
8
,
"word"
:
"En"
,
"start"
:
0
,
"end"
:
2
,
"index"
:
1
},
{
"entity"
:
"I-PER"
,
"score"
:
0.99
6
,
"word"
:
"##zo"
,
"start"
:
2
,
"end"
:
4
,
"index"
:
2
},
{
"entity"
:
"I-PER"
,
"score"
:
0.99
7
,
"word"
:
"##zo"
,
"start"
:
2
,
"end"
:
4
,
"index"
:
2
},
{
"entity"
:
"I-ORG"
,
"score"
:
0.999
,
"word"
:
"UN"
,
"start"
:
22
,
"end"
:
2
4
,
"index"
:
7
},
{
"entity"
:
"I-ORG"
,
"score"
:
0.999
,
"word"
:
"UN"
,
"start"
:
18
,
"end"
:
2
0
,
"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.99
6
,
"word"
:
"Enzo"
,
"start"
:
0
,
"end"
:
4
},
{
"entity_group"
:
"PER"
,
"score"
:
0.99
7
,
"word"
:
"Enzo"
,
"start"
:
0
,
"end"
:
4
},
{
"entity_group"
:
"ORG"
,
"score"
:
0.999
,
"word"
:
"UN"
,
"start"
:
22
,
"end"
:
2
4
},
{
"entity_group"
:
"ORG"
,
"score"
:
0.999
,
"word"
:
"UN"
,
"start"
:
18
,
"end"
:
2
0
},
],
],
)
)
...
@@ -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.99
7
,
"word"
:
"Enzo"
,
"start"
:
0
,
"end"
:
4
},
{
"entity_group"
:
"PER"
,
"score"
:
0.99
8
,
"word"
:
"Enzo"
,
"start"
:
0
,
"end"
:
4
},
{
"entity_group"
:
"ORG"
,
"score"
:
0.999
,
"word"
:
"UN"
,
"start"
:
22
,
"end"
:
2
4
},
{
"entity_group"
:
"ORG"
,
"score"
:
0.999
,
"word"
:
"UN"
,
"start"
:
18
,
"end"
:
2
0
},
],
],
)
)
...
@@ -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.99
7
,
"word"
:
"Enzo"
,
"start"
:
0
,
"end"
:
4
},
{
"entity_group"
:
"PER"
,
"score"
:
0.99
8
,
"word"
:
"Enzo"
,
"start"
:
0
,
"end"
:
4
},
{
"entity_group"
:
"ORG"
,
"score"
:
0.999
,
"word"
:
"UN"
,
"start"
:
22
,
"end"
:
2
4
},
{
"entity_group"
:
"ORG"
,
"score"
:
0.999
,
"word"
:
"UN"
,
"start"
:
18
,
"end"
:
2
0
},
],
],
)
)
...
@@ -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.99
6
,
"word"
:
"Enzo"
,
"start"
:
0
,
"end"
:
4
},
{
"entity_group"
:
"PER"
,
"score"
:
0.99
7
,
"word"
:
"Enzo"
,
"start"
:
0
,
"end"
:
4
},
{
"entity_group"
:
"ORG"
,
"score"
:
0.999
,
"word"
:
"UN"
,
"start"
:
22
,
"end"
:
2
4
},
{
"entity_group"
:
"ORG"
,
"score"
:
0.999
,
"word"
:
"UN"
,
"start"
:
18
,
"end"
:
2
0
},
],
],
)
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment