Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ValueError: 16 is not in list #8

Open
wunanfang opened this issue Mar 24, 2019 · 1 comment
Open

ValueError: 16 is not in list #8

wunanfang opened this issue Mar 24, 2019 · 1 comment
Labels

Comments

@wunanfang
Copy link

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
Copy link
Owner

evhub commented Mar 24, 2019

@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.

@evhub evhub added the bug label Mar 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants