Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
chenpangpang
transformers
Commits
e9d2a639
Unverified
Commit
e9d2a639
authored
Oct 21, 2021
by
Patrick von Platen
Committed by
GitHub
Oct 21, 2021
Browse files
up (#14093)
parent
49155d24
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
examples/pytorch/speech-recognition/run_speech_recognition_ctc.py
.../pytorch/speech-recognition/run_speech_recognition_ctc.py
+4
-3
No files found.
examples/pytorch/speech-recognition/run_speech_recognition_ctc.py
View file @
e9d2a639
...
@@ -592,15 +592,16 @@ def main():
...
@@ -592,15 +592,16 @@ def main():
trainer
.
save_metrics
(
"eval"
,
metrics
)
trainer
.
save_metrics
(
"eval"
,
metrics
)
# Write model card and (optionally) push to hub
# Write model card and (optionally) push to hub
config_name
=
data_args
.
dataset_config_name
if
data_args
.
dataset_config_name
is
not
None
else
"na"
kwargs
=
{
kwargs
=
{
"finetuned_from"
:
model_args
.
model_name_or_path
,
"finetuned_from"
:
model_args
.
model_name_or_path
,
"tasks"
:
"speech-recognition"
,
"tasks"
:
"speech-recognition"
,
"tags"
:
[
"automatic-speech-recognition"
,
data_args
.
dataset_name
],
"tags"
:
[
"automatic-speech-recognition"
,
data_args
.
dataset_name
],
"dataset_args"
:
f
"Config:
{
data_args
.
dataset_
config_name
}
, Training split:
{
data_args
.
train_split_name
}
, Eval split:
{
data_args
.
eval_split_name
}
"
,
"dataset_args"
:
f
"Config:
{
config_name
}
, Training split:
{
data_args
.
train_split_name
}
, Eval split:
{
data_args
.
eval_split_name
}
"
,
"dataset"
:
f
"
{
data_args
.
dataset_name
.
upper
()
}
-
{
data_args
.
dataset_
config_name
.
upper
()
}
"
,
"dataset"
:
f
"
{
data_args
.
dataset_name
.
upper
()
}
-
{
config_name
.
upper
()
}
"
,
}
}
if
"common_voice"
in
data_args
.
dataset_name
:
if
"common_voice"
in
data_args
.
dataset_name
:
kwargs
[
"language"
]
=
data_args
.
dataset_
config_name
kwargs
[
"language"
]
=
config_name
if
training_args
.
push_to_hub
:
if
training_args
.
push_to_hub
:
trainer
.
push_to_hub
(
**
kwargs
)
trainer
.
push_to_hub
(
**
kwargs
)
...
...
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