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
679d68a1
Unverified
Commit
679d68a1
authored
Aug 01, 2022
by
Ogundepo Odunayo
Committed by
GitHub
Aug 01, 2022
Browse files
Correct the spelling of bleu metric (#18375)
parent
1f843991
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
examples/pytorch/translation/run_translation.py
examples/pytorch/translation/run_translation.py
+2
-2
examples/pytorch/translation/run_translation_no_trainer.py
examples/pytorch/translation/run_translation_no_trainer.py
+1
-1
No files found.
examples/pytorch/translation/run_translation.py
View file @
679d68a1
...
@@ -119,12 +119,12 @@ class DataTrainingArguments:
...
@@ -119,12 +119,12 @@ class DataTrainingArguments:
validation_file
:
Optional
[
str
]
=
field
(
validation_file
:
Optional
[
str
]
=
field
(
default
=
None
,
default
=
None
,
metadata
=
{
metadata
=
{
"help"
:
"An optional input evaluation data file to evaluate the metrics (sacrebl
u
e) on a jsonlines file."
"help"
:
"An optional input evaluation data file to evaluate the metrics (sacreble
u
) on a jsonlines file."
},
},
)
)
test_file
:
Optional
[
str
]
=
field
(
test_file
:
Optional
[
str
]
=
field
(
default
=
None
,
default
=
None
,
metadata
=
{
"help"
:
"An optional input test data file to evaluate the metrics (sacrebl
u
e) on a jsonlines file."
},
metadata
=
{
"help"
:
"An optional input test data file to evaluate the metrics (sacreble
u
) on a jsonlines file."
},
)
)
overwrite_cache
:
bool
=
field
(
overwrite_cache
:
bool
=
field
(
default
=
False
,
metadata
=
{
"help"
:
"Overwrite the cached training and evaluation sets"
}
default
=
False
,
metadata
=
{
"help"
:
"Overwrite the cached training and evaluation sets"
}
...
...
examples/pytorch/translation/run_translation_no_trainer.py
View file @
679d68a1
...
@@ -695,7 +695,7 @@ def main():
...
@@ -695,7 +695,7 @@ def main():
if
args
.
with_tracking
:
if
args
.
with_tracking
:
accelerator
.
log
(
accelerator
.
log
(
{
{
"bl
u
e"
:
eval_metric
[
"score"
],
"ble
u
"
:
eval_metric
[
"score"
],
"train_loss"
:
total_loss
.
item
()
/
len
(
train_dataloader
),
"train_loss"
:
total_loss
.
item
()
/
len
(
train_dataloader
),
"epoch"
:
epoch
,
"epoch"
:
epoch
,
"step"
:
completed_steps
,
"step"
:
completed_steps
,
...
...
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