From 476f600be931e77b1d819ff05cc78709608d5269 Mon Sep 17 00:00:00 2001 From: Shijie <821898965@qq.com> Date: Tue, 24 Dec 2024 22:55:45 +0800 Subject: [PATCH] remove-redundant-code (#947) --- applications/DeepSpeed-Chat/dschat/utils/data/data_utils.py | 5 ----- 1 file changed, 5 deletions(-) diff --git a/applications/DeepSpeed-Chat/dschat/utils/data/data_utils.py b/applications/DeepSpeed-Chat/dschat/utils/data/data_utils.py index 7e3e6776b..e53042075 100644 --- a/applications/DeepSpeed-Chat/dschat/utils/data/data_utils.py +++ b/applications/DeepSpeed-Chat/dschat/utils/data/data_utils.py @@ -211,12 +211,7 @@ def create_dataset_split(current_dataset, raw_dataset, train_phase, tokenizer, padding="max_length", truncation=True, return_tensors="pt") - chosen_token["input_ids"] = chosen_token["input_ids"] - chosen_token["attention_mask"] = chosen_token["attention_mask"] chosen_dataset.append(chosen_token) - - reject_token["input_ids"] = reject_token["input_ids"] - reject_token["attention_mask"] = reject_token["attention_mask"] reject_dataset.append(reject_token) print( f'Creating dataset {raw_dataset.dataset_name_clean} for {train_phase=} size={len(chosen_dataset)}'