From 27d3db49eec36299363867dc431e292296f6b103 Mon Sep 17 00:00:00 2001 From: Brian <23239305+b-chu@users.noreply.github.com> Date: Thu, 19 Oct 2023 00:03:22 -0400 Subject: [PATCH] Allow no eval_loader when eval is disabled --- composer/trainer/trainer.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/composer/trainer/trainer.py b/composer/trainer/trainer.py index 48ba9d7dad..78c3f21bd4 100644 --- a/composer/trainer/trainer.py +++ b/composer/trainer/trainer.py @@ -1217,11 +1217,11 @@ def __init__( f'Specifying `eval_subset_num_batches={eval_subset_num_batches}` without an `eval_dataloader` ' 'has no effect. If trying to run an evaluator, make sure `eval_dataloader` is specified. ' 'Otherwise, set `eval_subset_num_batches` to default value -1.') - if eval_interval != 1: + if eval_interval != 0 and eval_interval != 1: raise ValueError( f'Specifying `eval_interval={eval_interval}` without an `eval_dataloader` has no effect. ' 'If trying to run an evaluator, make sure `eval_dataloader` is specified. Otherwise, ' - 'set `eval_interval` to default value 1.') + 'set `eval_interval` to 0 or default value 1.') self.state.evaluators = evaluators