From 59f1de06aeb0c006c26059c72d087c09eba6b3e7 Mon Sep 17 00:00:00 2001 From: Jeremy Dohmann Date: Fri, 2 Feb 2024 14:08:45 -0500 Subject: [PATCH] fix --- llmfoundry/utils/builders.py | 5 ++--- scripts/eval/eval.py | 3 +-- scripts/eval/yamls/hf_eval.yaml | 2 +- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/llmfoundry/utils/builders.py b/llmfoundry/utils/builders.py index 71b43c5189..eebd2ed7fa 100644 --- a/llmfoundry/utils/builders.py +++ b/llmfoundry/utils/builders.py @@ -507,9 +507,8 @@ def _validate_cfg(icl_cfg: DictConfig): dist.barrier() early_stopping_criteria = icl_cfg.get('early_stopping_criteria', None) - # early_stopping_criteria = list( - # early_stopping_criteria - # ) if early_stopping_criteria is not None else None + if isinstance(early_stopping_criteria, ListConfig): + early_stopping_criteria = om.to_container(early_stopping_criteria) dataloaders = get_icl_task_dataloader( icl_cfg.icl_task_type, icl_cfg.dataset_uri, diff --git a/scripts/eval/eval.py b/scripts/eval/eval.py index 6da4deb9bc..fb4b75ec31 100644 --- a/scripts/eval/eval.py +++ b/scripts/eval/eval.py @@ -268,8 +268,7 @@ def main(cfg: DictConfig) -> Tuple[List[Trainer], pd.DataFrame]: # Mandatory Evaluation Parameters icl_tasks: Union[str, ListConfig] = pop_config(cfg, 'icl_tasks', - must_exist=True, - convert=True) + must_exist=True) max_seq_len: int = pop_config(cfg, 'max_seq_len', must_exist=True) device_eval_batch_size: int = pop_config(cfg, 'device_eval_batch_size', diff --git a/scripts/eval/yamls/hf_eval.yaml b/scripts/eval/yamls/hf_eval.yaml index bf0426b357..5262008da1 100644 --- a/scripts/eval/yamls/hf_eval.yaml +++ b/scripts/eval/yamls/hf_eval.yaml @@ -12,7 +12,7 @@ models: model: name: hf_causal_lm pretrained_model_name_or_path: ${model_name_or_path} - init_device: mixed + init_device: cpu pretrained: true tokenizer: name: ${model_name_or_path}