Skip to content

Commit

Permalink
raise issue for invalid type
Browse files Browse the repository at this point in the history
  • Loading branch information
krypticmouse committed Nov 19, 2024
1 parent d914117 commit cdc0399
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions dspy/predict/parallel.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit cdc0399

Please sign in to comment.