diff --git a/pyproject.toml b/pyproject.toml index 09d8eae88..54d140283 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -51,7 +51,7 @@ train = ["datasets", "accelerate>=0.20.3"] onnx = ["optimum[onnxruntime]>=1.23.1"] onnx-gpu = ["optimum[onnxruntime-gpu]>=1.23.1"] openvino = ["optimum-intel[openvino]>=1.20.0"] -ipex = ["optimum-intel[ipex]>=1.20.0"] +ipex = ["optimum-intel[ipex]>=1.21.0"] dev = ["datasets", "accelerate>=0.20.3", "pre-commit", "pytest", "pytest-cov", "peft"] [build-system] diff --git a/sentence_transformers/models/Transformer.py b/sentence_transformers/models/Transformer.py index 7241cbb09..99ccaf9d3 100644 --- a/sentence_transformers/models/Transformer.py +++ b/sentence_transformers/models/Transformer.py @@ -190,7 +190,9 @@ def _load_model( elif backend == "ipex": self._load_ipex_model(model_name_or_path, config, cache_dir, **model_args) else: - raise ValueError(f"Unsupported backend '{backend}'. `backend` should be `torch`, `onnx`, `openvino`, or `ipex`.") + raise ValueError( + f"Unsupported backend '{backend}'. `backend` should be `torch`, `onnx`, `openvino`, or `ipex`." + ) def _load_peft_model(self, model_name_or_path: str, config: PeftConfig, cache_dir: str, **model_args) -> None: from peft import PeftModel diff --git a/tests/test_backends.py b/tests/test_backends.py index 5983807bb..0e3bd13c4 100644 --- a/tests/test_backends.py +++ b/tests/test_backends.py @@ -26,11 +26,7 @@ ## Testing exporting: @pytest.mark.parametrize( ["backend", "expected_auto_model_class"], - [ - ("onnx", ORTModelForFeatureExtraction), - ("openvino", OVModelForFeatureExtraction), - ("ipex", IPEXModel) - ], + [("onnx", ORTModelForFeatureExtraction), ("openvino", OVModelForFeatureExtraction), ("ipex", IPEXModel)], ) @pytest.mark.parametrize( "model_kwargs", [{}, {"file_name": "wrong_file_name"}]