Explorar o código

Stop altering `run_mode` automatically (#4371)

Lin Manhui hai 4 meses
pai
achega
3f9bb3845e
Modificáronse 1 ficheiros con 2 adicións e 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