diff --git a/optillm/__init__.py b/optillm/__init__.py index 506a00d..76134bd 100644 --- a/optillm/__init__.py +++ b/optillm/__init__.py @@ -1,5 +1,5 @@ # Version information -__version__ = "0.3.12" +__version__ = "0.3.13" # Import from server module from .server import ( diff --git a/pyproject.toml b/pyproject.toml index 813e2ff..b697021 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "optillm" -version = "0.3.12" +version = "0.3.13" description = "An optimizing inference proxy for LLMs." readme = "README.md" license = "Apache-2.0" diff --git a/tests/test_conversation_logging_server.py b/tests/test_conversation_logging_server.py index 0fdf983..ef22803 100644 --- a/tests/test_conversation_logging_server.py +++ b/tests/test_conversation_logging_server.py @@ -94,6 +94,8 @@ def _start_server_with_logging(cls): env["OPTILLM_API_KEY"] = "optillm" env["OPTILLM_LOG_CONVERSATIONS"] = "true" env["OPTILLM_CONVERSATION_LOG_DIR"] = str(cls.temp_log_dir) + # Enable MPS fallback to CPU for unsupported operations (fixes macOS compatibility) + env["PYTORCH_ENABLE_MPS_FALLBACK"] = "1" # Get the project root directory (parent of tests directory) project_root = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) diff --git a/tests/test_utils.py b/tests/test_utils.py index be99e19..30039a9 100644 --- a/tests/test_utils.py +++ b/tests/test_utils.py @@ -42,6 +42,8 @@ def start_test_server(model: str = TEST_MODEL, port: int = 8000) -> subprocess.P # Set environment for local inference env = os.environ.copy() env["OPTILLM_API_KEY"] = "optillm" + # Enable MPS fallback to CPU for unsupported operations (fixes macOS compatibility) + env["PYTORCH_ENABLE_MPS_FALLBACK"] = "1" # Get the project root directory (parent of tests directory) project_root = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))