From cdc039913db29f0770a39371438d4cb1e800dddd Mon Sep 17 00:00:00 2001 From: Herumb Shandilya Date: Mon, 18 Nov 2024 20:56:36 -0800 Subject: [PATCH] raise issue for invalid type --- dspy/predict/parallel.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dspy/predict/parallel.py b/dspy/predict/parallel.py index a6048960e..78ef3e8ea 100644 --- a/dspy/predict/parallel.py +++ b/dspy/predict/parallel.py @@ -51,6 +51,8 @@ def process_pair(pair): result = module(example) elif isinstance(example, tuple): result = module(*example) + else: + raise ValueError(f"Invalid example type: {type(example)}, only supported types are Example, dict, list and tuple") return result # Execute the processing function over the execution pairs