DSPy: The framework for programming—not prompting—language models
Python
WIP switching to Job
Isaac Millerbaa5f49e15fd
diff --git a/dsp/modules/trainable_anyscale.py b/dsp/modules/trainable_anyscale.pyindex 6b71ba17a..a347179c0 100644--- a/dsp/modules/trainable_anyscale.py+++ b/dsp/modules/trainable_anyscale.py@@ -15,7 +15,7 @@ try:except ImportError:anyscale = None-class TrainableAnyscale(TrainableLM):+class TrainableAnyscale():"""Wrapper around specifically the OpenAI API to finetune.Args:@@ -42,8 +42,8 @@ class TrainableAnyscale(TrainableLM):assert api_base is None, "There is no API base needed for this provider."assert anyscale is not None, "You must have the Anyscale SDK installed to use this class."api_key, api_base = "", ""- super().__init__(model, api_key=api_key, api_provider=api_provider, api_base=api_base, model_type=model_type, system_prompt=system_prompt, **kwargs)- assert self.provider == "anyscale", "You must use an Anyscale model with this class."+ # super().__init__(model, api_key=api_key, api_provider=api_provider, api_base=api_base, model_type=model_type, system_prompt=system_prompt, **kwargs)+ # assert self.provider == "anyscale", "You must use an Anyscale model with this class."self.fine_tuning_file_ids = {}def _verify_datasets(self, dataset: List[dict[str, Any]], valset: Optional[List[dict[str, Any]]]) -> bool:diff --git a/dspy/teleprompt/finetune_teleprompter.py b/dspy/teleprompt/finetune_teleprompter.pyindex 5f750cc6a..983232166 100644--- a/dspy/teleprompt/finetune_teleprompter.py+++ b/dspy/teleprompt/finetune_teleprompter.py@@ -8,6 +8,8 @@ from dspy.primitives.program import Programfrom dspy.primitives.prediction import Predictionfrom dspy.signatures.signature import signature_to_template+import concurrent.futures+#-------------------------------------------------------------------------------# Templates for the user-facing strings used by this module#-------------------------------------------------------------------------------@@ -163,14 +165,15 @@ def build_messages_from_trace(return data-+def dummy_metric(example, pred, trace=None, frac=1.0):+ return 1def bootstrap_data(program: Program,dataset: List[Example],metric: Optional[Callable[[Example, Prediction, Optional[List]], Union[bool, int, float]- ]] = None,+ ]] = dummy_metric,num_threads = 1,max_errors: int = 0) -> List[Dict[str, Any]]: