From cf2fc9e4324213c323e4f0bb9d7748534d453525 Mon Sep 17 00:00:00 2001 From: Chuck Tang Date: Thu, 17 Aug 2023 22:22:11 -0700 Subject: [PATCH] add eval error log flag --- scripts/eval/eval.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/eval/eval.py b/scripts/eval/eval.py index f620c6516e..00c19e179f 100644 --- a/scripts/eval/eval.py +++ b/scripts/eval/eval.py @@ -141,6 +141,9 @@ def evaluate_model(model_cfg: DictConfig, dist_timeout: Union[float, int], loggers.append(in_memory_logger) load_path = model_cfg.get('load_path', None) + if model_cfg.model.name == 'mpt_causal_lm' and load_path is None: + raise ValueError('MPT causal LMs require a load_path to the checkpoint for model evaluation. \ + Please check your yaml and the model_cfg to ensure that load_path is set.') assert composer_model is not None trainer = Trainer(