Last active
November 19, 2016 20:47
-
-
Save dareid/af04ea51ced11747d989 to your computer and use it in GitHub Desktop.
optunity bug
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{'a': '2', '': 'abb', 'abb': '4', 'aba': 0.744091796875} | |
{'a': '2', '': 'aba', 'abb': '3', 'aba': 0.994041796875} | |
{'a': '1', 'aba': None, 'abb': None, '2': None} | |
{'a': '2', '': 'abb', 'abb': '4', 'aba': 0.119216796875} | |
{'a': '2', '': 'aba', 'abb': '3', 'aba': 0.369166796875} | |
{'a': '2', '': 'aba', 'abb': '4', 'aba': 0.212948046875} | |
{'a': '2', '': 'abb', 'abb': '3', 'aba': 0.462898046875} | |
Traceback (most recent call last): | |
File "test.py", line 21, in <module> | |
optunity.maximize_structured(f, search_space=search, num_evals=10) | |
File "/usr/local/lib/python2.7/dist-packages/optunity/api.py", line 370, in maximize_structured | |
pmap=pmap, decoder=tree.decode) | |
File "/usr/local/lib/python2.7/dist-packages/optunity/api.py", line 266, in optimize | |
call_dict = f.call_log.to_dict() | |
File "/usr/local/lib/python2.7/dist-packages/optunity/functions.py", line 232, in to_dict | |
args[key].append(value) | |
KeyError: '2' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import optunity | |
def f(**kwargs): | |
print kwargs | |
return 0.0 | |
search = { | |
'a': { | |
'1': None, | |
'2': { | |
'aba': [0.0001, 0.9999], | |
'abb': { | |
'3': None, | |
'4': None | |
} | |
} | |
} | |
} | |
optunity.maximize_structured(f, search_space=search, num_evals=10) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thank you for notifying us. We will look into this ASAP!