evhub / bbopt

Black box hyperparameter optimization made easy.
Apache License 2.0
75 stars 8 forks source link

ValueError: 16 is not in list #8

Open wunanfang opened 5 years ago

wunanfang commented 5 years ago

Hi,here is the problem when i using BBopt in my project. Traceback (most recent call last): File "I:/intention recognition/MyBBopt/testFile.py", line 167, in <module> run_trial() File "I:/intention recognition/MyBBopt/testFile.py", line 81, in run_trial bb.run() File "D:\Anaconda\lib\site-packages\bbopt\optimizer.py", line 255, in run self.run_backend(backend, **options) File "D:\Anaconda\lib\site-packages\bbopt\optimizer.py", line 242, in run_backend self.backend = init_backend(backend, self._examples, self._old_params, *args, **options) File "D:\Anaconda\lib\site-packages\bbopt\backends\hyperopt.py", line 132, in __init__ trial_list = examples_to_trials(examples, params) File "D:\Anaconda\lib\site-packages\bbopt\backends\hyperopt.py", line 103, in examples_to_trials for k, v in zip(sorted(params), make_features(ex["values"], params, fallback_func=lambda name, func, *args, **kwargs: NA, converters={"choice": lambda val, choices: choices.index(val), "randrange": lambda val, start, stop, step: val - start}, convert_fallback=False)): File "D:\Anaconda\lib\site-packages\bbopt\backends\util.py", line 90, in make_features feature = converter_func(feature, *args) File "D:\Anaconda\lib\site-packages\bbopt\backends\hyperopt.py", line 103, in <lambda> for k, v in zip(sorted(params), make_features(ex["values"], params, fallback_func=lambda name, func, *args, **kwargs: NA, converters={"choice": lambda val, choices: choices.index(val), "randrange": lambda val, start, stop, step: val - start}, convert_fallback=False)): ValueError: 16 is not in list

i really confused,what's the meaning of 16? it doesn't exist in my project. Could you give me any advice?

evhub commented 5 years ago

@wunanfang I think you probably changed the arguments for one of your parameters without deleting old data generated with those parameters. If you remove your old data, do you still get this problem? Regardless, the newest version of BBopt should now produce a better error message in that situation.