From 7ee3c4cacb1c7a0d92810247f014a7394e07db80 Mon Sep 17 00:00:00 2001 From: NanoCode012 Date: Sat, 25 Nov 2023 16:04:00 +0900 Subject: [PATCH] fix: warning should not show if eval_batch_size not provided (#896) --- src/axolotl/utils/config.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/axolotl/utils/config.py b/src/axolotl/utils/config.py index c41e059cd..4fb29c884 100644 --- a/src/axolotl/utils/config.py +++ b/src/axolotl/utils/config.py @@ -165,7 +165,11 @@ def validate_config(cfg): "batch_size is not recommended. Please use gradient_accumulation_steps instead.", "To calculate the equivalent gradient_accumulation_steps, divide batch_size / micro_batch_size / number of gpus.", ) - if cfg.eval_batch_size != cfg.micro_batch_size: + if ( + cfg.eval_batch_size + and cfg.micro_batch_size + and cfg.eval_batch_size != cfg.micro_batch_size + ): LOG.warning( "eval_batch_size != micro_batch_size. This can lead to VRAM instability." )