Skip to content

Commit

Permalink
update eval_strategy (#1662)
Browse files Browse the repository at this point in the history
  • Loading branch information
kashif committed May 23, 2024
1 parent e4ed7a3 commit bc8dfbf
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 12 deletions.
7 changes: 6 additions & 1 deletion tests/test_dpo_trainer.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ def _init_dummy_dataset(self):
["t5", "sppo_hard", True],
["gpt2", "nca_pair", False],
["t5", "nca_pair", True],
["gpt2", "robust", True],
]
)
def test_dpo_trainer(self, name, loss_type, pre_compute):
Expand Down Expand Up @@ -317,7 +318,7 @@ def test_tr_dpo_trainer(self):
remove_unused_columns=False,
gradient_accumulation_steps=4,
learning_rate=9e-1,
evaluation_strategy="steps",
eval_strategy="steps",
precompute_ref_log_probs=False,
sync_ref_model=True,
ref_model_mixup_alpha=0.5,
Expand Down Expand Up @@ -508,6 +509,10 @@ def test_dpo_lora_bf16_autocast_llama(self):
["gpt2", "bco_pair", False, True],
["gpt2", "bco_pair", True, False],
["gpt2", "bco_pair", True, True],
["gpt2", "robust", False, False],
["gpt2", "robust", False, True],
["gpt2", "robust", True, False],
["gpt2", "robust", True, True],
]
)
@require_bitsandbytes
Expand Down
2 changes: 1 addition & 1 deletion tests/test_kto_trainer.py
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ def test_kto_trainer_bco_udm(self):
remove_unused_columns=False,
gradient_accumulation_steps=4,
learning_rate=9e-1,
evaluation_strategy="steps",
eval_strategy="steps",
beta=0.1,
loss_type="bco",
)
Expand Down
20 changes: 10 additions & 10 deletions tests/test_sft_trainer.py
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ def test_sft_trainer_uncorrect_data(self):
training_args = SFTConfig(
output_dir=tmp_dir,
dataloader_drop_last=True,
evaluation_strategy="steps",
eval_strategy="steps",
max_steps=2,
eval_steps=1,
save_steps=1,
Expand All @@ -281,7 +281,7 @@ def test_sft_trainer_uncorrect_data(self):
training_args = SFTConfig(
output_dir=tmp_dir,
dataloader_drop_last=True,
evaluation_strategy="steps",
eval_strategy="steps",
max_steps=2,
eval_steps=1,
save_steps=1,
Expand All @@ -298,7 +298,7 @@ def test_sft_trainer_uncorrect_data(self):
training_args = SFTConfig(
output_dir=tmp_dir,
dataloader_drop_last=True,
evaluation_strategy="steps",
eval_strategy="steps",
max_steps=2,
eval_steps=1,
save_steps=1,
Expand All @@ -315,7 +315,7 @@ def test_sft_trainer_uncorrect_data(self):
training_args = SFTConfig(
output_dir=tmp_dir,
dataloader_drop_last=True,
evaluation_strategy="steps",
eval_strategy="steps",
max_steps=2,
eval_steps=1,
save_steps=1,
Expand All @@ -331,7 +331,7 @@ def test_sft_trainer_uncorrect_data(self):
training_args = SFTConfig(
output_dir=tmp_dir,
dataloader_drop_last=True,
evaluation_strategy="steps",
eval_strategy="steps",
max_steps=2,
eval_steps=1,
save_steps=1,
Expand All @@ -352,7 +352,7 @@ def test_sft_trainer_uncorrect_data(self):
training_args = SFTConfig(
output_dir=tmp_dir,
dataloader_drop_last=True,
evaluation_strategy="steps",
eval_strategy="steps",
max_steps=2,
eval_steps=1,
save_steps=1,
Expand All @@ -372,7 +372,7 @@ def test_sft_trainer_uncorrect_data(self):
training_args = SFTConfig(
output_dir=tmp_dir,
dataloader_drop_last=True,
evaluation_strategy="steps",
eval_strategy="steps",
max_steps=2,
eval_steps=1,
save_steps=1,
Expand All @@ -390,7 +390,7 @@ def test_sft_trainer_uncorrect_data(self):
training_args = SFTConfig(
output_dir=tmp_dir,
dataloader_drop_last=True,
evaluation_strategy="steps",
eval_strategy="steps",
max_steps=2,
eval_steps=1,
save_steps=1,
Expand Down Expand Up @@ -1089,7 +1089,7 @@ def test_sft_trainer_eval_packing(self):
training_args = SFTConfig(
output_dir=tmp_dir,
dataloader_drop_last=True,
evaluation_strategy="steps",
eval_strategy="steps",
max_steps=4,
eval_steps=2,
save_steps=2,
Expand All @@ -1111,7 +1111,7 @@ def test_sft_trainer_eval_packing(self):
training_args = SFTConfig(
output_dir=tmp_dir,
dataloader_drop_last=True,
evaluation_strategy="steps",
eval_strategy="steps",
max_steps=4,
eval_steps=2,
save_steps=2,
Expand Down

0 comments on commit bc8dfbf

Please sign in to comment.