fix: warning should not show if eval_batch_size not provided (#896)

This commit is contained in:
NanoCode012
2023-11-25 16:04:00 +09:00
committed by GitHub
parent fb12895a17
commit 7ee3c4cacb

View File

@@ -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."
)