From 157daccd9ce029758da3cb1e7c7579b9fa452d71 Mon Sep 17 00:00:00 2001 From: Sean Lee Date: Mon, 30 Sep 2024 09:56:17 +0800 Subject: [PATCH] set do_eval --- angle_emb/angle.py | 1 + angle_emb/angle_trainer.py | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/angle_emb/angle.py b/angle_emb/angle.py index 333ece1..cb317ab 100644 --- a/angle_emb/angle.py +++ b/angle_emb/angle.py @@ -1531,6 +1531,7 @@ def fit(self, dataset_format=self.detect_dataset_format(train_ds), train_dataset=train_ds, eval_dataset=valid_ds, + do_eval=valid_ds is not None, loss_kwargs=loss_kwargs, tokenizer=self.tokenizer, args=TrainingArguments( diff --git a/angle_emb/angle_trainer.py b/angle_emb/angle_trainer.py index 8936010..0ef536d 100644 --- a/angle_emb/angle_trainer.py +++ b/angle_emb/angle_trainer.py @@ -36,7 +36,8 @@ parser.add_argument('--valid_split_name', type=str, default='train', help='Specify huggingface datasets split name for valid set, default `train`') parser.add_argument('--valid_name_or_path_for_callback', type=str, default=None, - help='Specify huggingface datasets name or local file path for callback valid set, default None.') + help='Specify huggingface datasets name or local file path for callback valid set. ' + 'The dataset format should be `DatasetFormats.A`. Default None.') parser.add_argument('--valid_subset_name_for_callback', type=str, default=None, help='Specify huggingface datasets subset name for valid set for callback use, default None') parser.add_argument('--valid_split_name_for_callback', type=str, default='train',