Explorar el Código

Stop altering `run_mode` automatically (#4371)

Lin Manhui hace 4 meses
padre
commit
3f9bb3845e
Se han modificado 1 ficheros con 2 adiciones y 2 borrados
  1. 2 2
      paddlex/inference/utils/pp_option.py

+ 2 - 2
paddlex/inference/utils/pp_option.py

@@ -137,8 +137,8 @@ class PaddlePredictorOption(object):
             )
 
         if run_mode.startswith("mkldnn") and not is_mkldnn_available():
-            logging.warning("MKL-DNN is not available. Using `paddle` instead.")
-            run_mode = "paddle"
+            raise ValueError("MKL-DNN is not available")
+
         self._update("run_mode", run_mode)
 
     @property