Skip to content

Commit

Permalink
no warn (#8329)
Browse files Browse the repository at this point in the history
  • Loading branch information
sshleifer authored Nov 5, 2020
1 parent 52f44dd commit 7abc1d9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion examples/seq2seq/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ def __init__(self, tokenizer, data_args, tpu_num_cores=None):
), f"pad_token_id is not defined for ({self.tokenizer.__class__.__name__}), it must be defined."
self.data_args = data_args
self.tpu_num_cores = tpu_num_cores
self.dataset_kwargs = {"add_prefix_space": isinstance(tokenizer, BartTokenizer)}
self.dataset_kwargs = {"add_prefix_space": True} if isinstance(tokenizer, BartTokenizer) else {}
if data_args.src_lang is not None:
self.dataset_kwargs["src_lang"] = data_args.src_lang
if data_args.tgt_lang is not None:
Expand Down

0 comments on commit 7abc1d9

Please sign in to comment.