mirror of
https://github.com/huggingface/transformers.git
synced 2025-07-14 18:18:24 +06:00
removing f-string
This commit is contained in:
parent
4df6027453
commit
45efc9d807
@ -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()
|
||||||
|
Loading…
Reference in New Issue
Block a user