From 8f521ea2f69b91c0189b1c06d3e8641340f4f4be Mon Sep 17 00:00:00 2001 From: wxywb Date: Thu, 9 Feb 2023 16:45:29 +0000 Subject: [PATCH] remove test in the clip training. Signed-off-by: wxywb --- train_clip_with_hf_trainer.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/train_clip_with_hf_trainer.py b/train_clip_with_hf_trainer.py index 5b36085..5184fde 100644 --- a/train_clip_with_hf_trainer.py +++ b/train_clip_with_hf_trainer.py @@ -236,9 +236,6 @@ def train_with_hf_trainer(model, tokenizer, data_args, training_args, **kwargs): if data_args.validation_file is not None: data_files["validation"] = data_args.validation_file extension = data_args.validation_file.split(".")[-1] - if data_args.test_file is not None: - data_files["test"] = data_args.test_file - extension = data_args.test_file.split(".")[-1] dataset = load_dataset( extension, data_files=data_files, @@ -273,10 +270,8 @@ def train_with_hf_trainer(model, tokenizer, data_args, training_args, **kwargs): column_names = dataset["train"].column_names elif training_args.do_eval: column_names = dataset["validation"].column_names - elif training_args.do_predict: - column_names = dataset["test"].column_names else: - logger.info("There is nothing to do. Please pass `do_train`, `do_eval` and/or `do_predict`.") + logger.info("There is nothing to do. Please pass `do_train`, `do_eval`.") return dataset_columns = dataset_name_mapping.get(data_args.dataset_name, None)