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
45efc9d8
".github/vscode:/vscode.git/clone" did not exist on "add415124f8c6814763125a0d98411bf61222e30"
Commit
45efc9d8
authored
Nov 03, 2018
by
thomwolf
Browse files
removing f-string
parent
4df60274
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
5 deletions
+3
-5
run_classifier_pytorch.py
run_classifier_pytorch.py
+3
-5
No files found.
run_classifier_pytorch.py
View file @
45efc9d8
...
@@ -451,13 +451,11 @@ def main():
...
@@ -451,13 +451,11 @@ def main():
if
args
.
max_seq_length
>
bert_config
.
max_position_embeddings
:
if
args
.
max_seq_length
>
bert_config
.
max_position_embeddings
:
raise
ValueError
(
raise
ValueError
(
"Cannot use sequence length %d because the BERT model "
"Cannot use sequence length {} because the BERT model was only trained up to sequence length {}"
.
format
(
"was only trained up to sequence length %d"
%
args
.
max_seq_length
,
bert_config
.
max_position_embeddings
))
(
args
.
max_seq_length
,
bert_config
.
max_position_embeddings
))
if
os
.
path
.
exists
(
args
.
output_dir
)
and
os
.
listdir
(
args
.
output_dir
):
if
os
.
path
.
exists
(
args
.
output_dir
)
and
os
.
listdir
(
args
.
output_dir
):
raise
ValueError
(
f
"Output directory (
{
args
.
output_dir
}
) already exists and is "
raise
ValueError
(
"Output directory ({}) already exists and is not empty."
.
format
(
args
.
output_dir
))
f
"not empty."
)
os
.
makedirs
(
args
.
output_dir
,
exist_ok
=
True
)
os
.
makedirs
(
args
.
output_dir
,
exist_ok
=
True
)
task_name
=
args
.
task_name
.
lower
()
task_name
=
args
.
task_name
.
lower
()
...
...
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