DSPy: The framework for programming—not prompting—language models
Python
lint fixes
Herumb Shandilyacd78c4d57ca5
diff --git a/dspy/experimental/synthesizer/config.py b/dspy/experimental/synthesizer/config.pyindex 640989c22..557299cfa 100644--- a/dspy/experimental/synthesizer/config.py+++ b/dspy/experimental/synthesizer/config.py@@ -1,6 +1,8 @@-from typing import Optional, Any+from typing import Any, Optional+from pydantic import BaseModel, model_validator+class SynthesizerArguments(BaseModel):feedback_mode: Optional[str] = Nonenum_example_for_feedback: Optional[int] = Nonediff --git a/dspy/experimental/synthesizer/synthesizer.py b/dspy/experimental/synthesizer/synthesizer.pyindex a3ffdcda8..ad71f9eee 100644--- a/dspy/experimental/synthesizer/synthesizer.py+++ b/dspy/experimental/synthesizer/synthesizer.py@@ -1,11 +1,12 @@-import dspyimport random+from collections.abc import Mapping+from typing import List, Optional, Unionfrom datasets import Dataset-from tqdm import tqdm, trangefrom rich import print as rprint-from collections.abc import Mapping-from typing import List, Optional, Union+from tqdm import tqdm, trange++import dspyfrom .config import SynthesizerArgumentsfrom .instruction_suffixes import (diff --git a/dspy/experimental/synthesizer/utils.py b/dspy/experimental/synthesizer/utils.pyindex b52ae9016..f08b142e1 100644--- a/dspy/experimental/synthesizer/utils.py+++ b/dspy/experimental/synthesizer/utils.py@@ -1,6 +1,8 @@-import dspyfrom typing import List+import dspy++def format_examples(examples: List[dspy.Example]) -> str:if isinstance(examples, str):return examples