diff --git a/paddleslim/quant/post_quant_hpo.py b/paddleslim/quant/post_quant_hpo.py index 92617a4c5f7a266a0fe29946bbe52fa564c2e053..9d631c6b9c6e4df8856c9c6a5b5a134b39a5be3c 100755 --- a/paddleslim/quant/post_quant_hpo.py +++ b/paddleslim/quant/post_quant_hpo.py @@ -417,8 +417,11 @@ def quant_post_hpo( try: import smac + assert smac.version == '1.4.0' except: - os.system('python -m pip install -U smac') + _logger.warning( + "smac==1.4.0 is required, please use \"pip install smac==1.4.0\".") + os.system('python -m pip install smac==1.4.0') # smac from ConfigSpace.hyperparameters import CategoricalHyperparameter, \ UniformFloatHyperparameter, UniformIntegerHyperparameter