Skip to content

Commit

Permalink
add eval error log flag
Browse files Browse the repository at this point in the history
  • Loading branch information
j316chuck committed Aug 18, 2023
1 parent 36cee64 commit cf2fc9e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions scripts/eval/eval.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit cf2fc9e

Please sign in to comment.