From 9cb1f119a4757c4fd2dc6db9335589d94f6ab5eb Mon Sep 17 00:00:00 2001 From: hiyouga Date: Mon, 31 Jul 2023 23:48:57 +0800 Subject: [PATCH] fix arg check --- src/llmtuner/tuner/core/parser.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/llmtuner/tuner/core/parser.py b/src/llmtuner/tuner/core/parser.py index be515288..1dc60039 100644 --- a/src/llmtuner/tuner/core/parser.py +++ b/src/llmtuner/tuner/core/parser.py @@ -108,7 +108,11 @@ def get_train_args( logger.warning("`dev_ratio` is incompatible with `streaming`. Disabling development set.") data_args.dev_ratio = 0 - assert not (training_args.max_steps == -1 and data_args.streaming), "Please specify `max_steps` in streaming mode." + assert not (training_args.max_steps == -1 and data_args.streaming), \ + "Please specify `max_steps` in streaming mode." + + assert training_args.evaluation_strategy == "no" or (not data_args.streaming), \ + "Streaming mode does not support evaluation currently." training_args.optim = "adamw_torch" if training_args.optim == "adamw_hf" else training_args.optim # suppress warning