Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
ydshieh committed Jul 9, 2024
1 parent d5261bc commit f7a7dab
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/transformers/trainer_seq2seq.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,11 +111,11 @@ def load_generation_config(gen_config_arg: Union[str, GenerationConfig]) -> Gene

# Strict validation to fail early. `GenerationConfig.save_pretrained()`, run at the end of training, throws
# an exception if there are warnings at validation time.
try:
with warnings.catch_warnings(record=True) as caught_warnings:
gen_config.validate()
if len(caught_warnings) == 0:
raise ValueError("Hello")

with warnings.catch_warnings(record=True) as caught_warnings:
gen_config.validate()
if len(caught_warnings) == 0:
raise ValueError("Hello")
return gen_config

def evaluate(
Expand Down

0 comments on commit f7a7dab

Please sign in to comment.