DSPy: The framework for programming—not prompting—language models
Python
ruff + remove self hosted
Isaac Millerc72619f86ba5
diff --git a/dspy/clients/self_hosted.py b/dspy/clients/self_hosted.pydeleted file mode 100644index e3ca93077..000000000--- a/dspy/clients/self_hosted.py+++ /dev/null@@ -1,34 +0,0 @@-from typing import Dict, Any--from dspy.clients.openai import is_openai_model---#--------------------------------------------------------------------------------# Function and classes required for the fine-tune interface-#---------------------------------------------------------------------------------# TODO: Missing FinetuneJobSelfHosted class and finetune_self_hosted function-def is_self_hosted_model(model: str) -> bool:- """Check if the model is self-hosted."""-- # Filter the models names that don't start with the prefix "openai/", since- # all the self-hosted models have this prefix.- if not model.startswith("openai/"):- return False-- return not is_openai_model(model)---#--------------------------------------------------------------------------------# Launching and killing self hosted LMs-#---------------------------------------------------------------------------------def self_hosted_model_launch(model: str, launch_kwargs: Dict[str, Any]):- """Launch a self-hosted model."""- # TODO: Hardcode resources for launching a select server through docker- raise NotImplementedError("Method `self_hosted_model_launch` is not implemented.")--def self_hosted_model_kill(model: str, launch_kwargs: Dict[str, Any]):- # TODO: Hardcode resources for killing a select server through docker- """Kill a self-hosted model."""- raise NotImplementedError("Method `self_hosted_model_kill` is not implemented.")diff --git a/dspy/predict/predict.py b/dspy/predict/predict.pyindex 673cf905d..8e51d5b95 100644--- a/dspy/predict/predict.py+++ b/dspy/predict/predict.py@@ -1,7 +1,6 @@from functools import lru_cacheimport loggingimport random-from typing import Optionalfrom pydantic import BaseModeldiff --git a/dspy/primitives/program.py b/dspy/primitives/program.pyindex 9f9eaf74c..cfe9deb28 100644--- a/dspy/primitives/program.py+++ b/dspy/primitives/program.py@@ -1,4 +1,3 @@-from typing import Optionalimport magicattr