🚨🚨🚨Deprecate evaluation_strategy to eval_strategy🚨🚨🚨 (#30190)

* Alias

* Note alias

* Tests and src

* Rest

* Clean

* Change typing?

* Fix tests

* Deprecation versions
This commit is contained in:
Zach Mueller
2024-04-18 12:49:43 -04:00
committed by GitHub
parent c86d020ead
commit 60d5f8f9f0
116 changed files with 214 additions and 203 deletions

View File

@@ -18,7 +18,7 @@ python finetune_trainer.py \
--learning_rate=3e-5 \
--fp16 \
--do_train --do_eval --do_predict \
--evaluation_strategy steps \
--eval_strategy steps \
--predict_with_generate \
--n_val 1000 \
"$@"

View File

@@ -20,7 +20,7 @@ python xla_spawn.py --num_cores $TPU_NUM_CORES \
finetune_trainer.py \
--learning_rate=3e-5 \
--do_train --do_eval \
--evaluation_strategy steps \
--eval_strategy steps \
--prediction_loss_only \
--n_val 1000 \
"$@"

View File

@@ -271,7 +271,7 @@ def main():
max_source_length=data_args.max_source_length,
prefix=model.config.prefix or "",
)
if training_args.do_eval or training_args.evaluation_strategy != EvaluationStrategy.NO
if training_args.do_eval or training_args.eval_strategy != EvaluationStrategy.NO
else None
)
test_dataset = (

View File

@@ -32,7 +32,7 @@ python finetune_trainer.py \
--max_source_length $MAX_LEN --max_target_length $MAX_LEN \
--val_max_target_length $MAX_TGT_LEN --test_max_target_length $MAX_TGT_LEN \
--do_train --do_eval --do_predict \
--evaluation_strategy steps \
--eval_strategy steps \
--predict_with_generate --logging_first_step \
--task translation --label_smoothing_factor 0.1 \
"$@"

View File

@@ -33,7 +33,7 @@ python xla_spawn.py --num_cores $TPU_NUM_CORES \
--max_source_length $MAX_LEN --max_target_length $MAX_LEN \
--val_max_target_length $MAX_TGT_LEN --test_max_target_length $MAX_TGT_LEN \
--do_train --do_eval \
--evaluation_strategy steps \
--eval_strategy steps \
--prediction_loss_only \
--task translation --label_smoothing_factor 0.1 \
"$@"

View File

@@ -34,6 +34,6 @@ python finetune_trainer.py \
--logging_first_step \
--max_target_length 56 --val_max_target_length $MAX_TGT_LEN --test_max_target_length $MAX_TGT_LEN\
--do_train --do_eval --do_predict \
--evaluation_strategy steps \
--eval_strategy steps \
--predict_with_generate --sortish_sampler \
"$@"

View File

@@ -29,7 +29,7 @@ python finetune_trainer.py \
--num_train_epochs 6 \
--save_steps 25000 --eval_steps 25000 --logging_steps 1000 \
--do_train --do_eval --do_predict \
--evaluation_strategy steps \
--eval_strategy steps \
--predict_with_generate --logging_first_step \
--task translation \
"$@"