From 6cc6f8230a8077fe12bea4e3d83923d874918e57 Mon Sep 17 00:00:00 2001 From: zhouzj <41366441+zzjjay@users.noreply.github.com> Date: Fri, 24 Mar 2023 10:36:54 +0800 Subject: [PATCH] Update SMAC version requirements (#1701) --- paddleslim/quant/post_quant_hpo.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/paddleslim/quant/post_quant_hpo.py b/paddleslim/quant/post_quant_hpo.py index 92617a4c..9d631c6b 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 -- GitLab