diff --git a/src/deepsparse/evaluation/integrations/lm_evaluation_harness.py b/src/deepsparse/evaluation/integrations/lm_evaluation_harness.py index 6e0711cb3c..654aedf5d8 100644 --- a/src/deepsparse/evaluation/integrations/lm_evaluation_harness.py +++ b/src/deepsparse/evaluation/integrations/lm_evaluation_harness.py @@ -67,8 +67,17 @@ def integration_eval( """ pipeline = DeepSparseLM(pipeline=pipeline, batch_size=batch_size) - datasets = (",").join(datasets) if isinstance(datasets, list) else datasets - task_names = utils.pattern_match(datasets.split(","), tasks.ALL_TASKS) + datasets = datasets if isinstance(datasets, list) else [datasets] + task_names = [] + for idx, dataset in enumerate(datasets): + task_name = utils.pattern_match(dataset, tasks.ALL_TASKS) + if not task_name: + raise ValueError( + f"could recognize the dataset: {datasets[idx]}. Make sure " + "that the requested dataset is compatible with the " + "llm-evaluation-harness" + ) + task_names.extend(task_name) _LOGGER.info(f"Selected Tasks: {task_names}")