Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 2 additions & 12 deletions dspy/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@
configure = settings.configure
context = settings.context

BootstrapRS = BootstrapFewShotWithRandomSearch

from .__metadata__ import (
__name__,
__version__,
Expand All @@ -32,15 +34,3 @@
__author__,
__author_email__
)

import dspy.teleprompt

LabeledFewShot = dspy.teleprompt.LabeledFewShot
BootstrapFewShot = dspy.teleprompt.BootstrapFewShot
BootstrapFewShotWithRandomSearch = dspy.teleprompt.BootstrapFewShotWithRandomSearch
BootstrapRS = dspy.teleprompt.BootstrapFewShotWithRandomSearch
BootstrapFinetune = dspy.teleprompt.BootstrapFinetune
BetterTogether = dspy.teleprompt.BetterTogether
COPRO = dspy.teleprompt.COPRO
MIPROv2 = dspy.teleprompt.MIPROv2
Ensemble = dspy.teleprompt.Ensemble
7 changes: 7 additions & 0 deletions dspy/adapters/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,10 @@
from dspy.adapters.chat_adapter import ChatAdapter
from dspy.adapters.json_adapter import JSONAdapter
from dspy.adapters.image_utils import Image

__all__ = [
"Adapter",
"ChatAdapter",
"JSONAdapter",
"Image",
]
2 changes: 1 addition & 1 deletion dspy/clients/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@ def disable_litellm_logging():


__all__ = [
"BaseLM",
"LM",
"Provider",
"TrainingJob",
"BaseLM",
"inspect_history",
"Embedder",
"enable_litellm_logging",
Expand Down
10 changes: 10 additions & 0 deletions dspy/evaluate/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,13 @@
from dspy.evaluate.metrics import answer_exact_match, answer_passage_match
from dspy.evaluate.evaluate import Evaluate
from dspy.evaluate.auto_evaluation import SemanticF1, CompleteAndGrounded

__all__ = [
"EM",
"normalize_text",
"answer_exact_match",
"answer_passage_match",
"Evaluate",
"SemanticF1",
"CompleteAndGrounded",
]
9 changes: 8 additions & 1 deletion dspy/experimental/synthesizer/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1,8 @@
from dspy.experimental.synthesizer import *
from dspy.experimental.synthesizer.synthesizer import Synthesizer
from dspy.experimental.synthesizer.config import SynthesizerArguments


__all__ = [
"Synthesizer",
"SynthesizerArguments",
]
13 changes: 4 additions & 9 deletions dspy/experimental/synthesizer/synthesizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,12 @@
from tqdm import tqdm, trange

import dspy

from .config import SynthesizerArguments
from .instruction_suffixes import (
from dspy.experimental.synthesizer.config import SynthesizerArguments
from dspy.experimental.synthesizer.instruction_suffixes import (
INPUT_GENERATION_TASK_WITH_EXAMPLES_SUFFIX,
INPUT_GENERATION_TASK_WITH_FEEDBACK_SUFFIX,
)
from .signatures import (
from dspy.experimental.synthesizer.signatures import (
ExplainTask,
GenerateFieldDescription,
GenerateInputFieldsData,
Expand All @@ -22,12 +21,8 @@
UnderstandTask,
UpdateTaskDescriptionBasedOnFeedback,
)
from .utils import format_examples
from dspy.experimental.synthesizer.utils import format_examples

__all__ = [
"Synthesizer",
"SynthesizerArguments",
]

class Synthesizer:
def __init__(self, config: SynthesizerArguments):
Expand Down
4 changes: 1 addition & 3 deletions dspy/primitives/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from dspy.primitives.module import BaseModule
from dspy.primitives.prediction import Prediction, Completions
from dspy.primitives.program import Program, Module
from dspy.primitives.python_interpreter import PythonInterpreter, TextPrompt, CodePrompt
from dspy.primitives.python_interpreter import PythonInterpreter


__all__ = [
Expand All @@ -15,6 +15,4 @@
"Program",
"Module",
"PythonInterpreter",
"TextPrompt",
"CodePrompt",
]
1 change: 1 addition & 0 deletions dspy/signatures/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
infer_prefix,
)


__all__ = [
"InputField",
"OutputField",
Expand Down
Loading