From 00711249947fa2c65a4565e805cf6134af135699 Mon Sep 17 00:00:00 2001 From: wql Date: Thu, 26 Sep 2024 14:27:01 +0800 Subject: [PATCH] chore: add print --- src/llamafactory/data/loader.py | 4 ---- src/llamafactory/train/sft/workflow.py | 4 ++++ 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/llamafactory/data/loader.py b/src/llamafactory/data/loader.py index 720fa493..7dbd1324 100644 --- a/src/llamafactory/data/loader.py +++ b/src/llamafactory/data/loader.py @@ -213,10 +213,6 @@ def get_dataset( if has_tokenized_data(data_args.tokenized_path): logger.warning("Loading dataset from disk will ignore other data arguments.") dataset_dict: "DatasetDict" = load_from_disk(data_args.tokenized_path) - print(data_args.tokenized_path) - print(dataset_dict) - time.sleep(100) - logger.info("Loaded tokenized dataset from {}.".format(data_args.tokenized_path)) dataset_module: Dict[str, "Dataset"] = {} diff --git a/src/llamafactory/train/sft/workflow.py b/src/llamafactory/train/sft/workflow.py index ef3bc897..f02e5c86 100644 --- a/src/llamafactory/train/sft/workflow.py +++ b/src/llamafactory/train/sft/workflow.py @@ -15,6 +15,7 @@ # See the License for the specific language governing permissions and # limitations under the License. +import time from typing import TYPE_CHECKING, List, Optional from ...data import SFTDataCollatorWith4DAttentionMask, get_dataset @@ -113,6 +114,9 @@ def run_sft( # Predict if training_args.do_predict: predict_results = trainer.predict(dataset_module["eval_dataset"], metric_key_prefix="predict", **gen_kwargs) + + print(predict_results.metrics) + time.sleep(100) if training_args.predict_with_generate: # predict_loss will be wrong if predict_with_generate is enabled predict_results.metrics.pop("predict_loss", None) trainer.log_metrics("predict", predict_results.metrics)