error encountered by intilalization of safeopt_advisor #89
Replies: 2 comments
-
Hi @gaoguanlin, we are glad that openbox can help you with your research. We are investigating the implementation of safeopt in openbox. From the source code, it looks like you need to provide a list of config ( However, I suggest you provide a list of config as the seed_set, because constructing config from array is much more complicated -- int/float parameters should be scaled to [0, 1] and categorical/ordinal parameters should be encoded in the array. Instead, constructing config from dict is direct: from ConfigSpace import Configuration
config_dict = {'x1': 123, 'x2': 456.78, 'xc': 'cat'}
config = Configuration(config_space, values=config_dict) Indeed, safeopt is not fully integrated into openbox yet. We may modify the code and update the API of safeopt without further notice, and we will improve the doc and test of modules in development. All contributions to openbox are very welcome and appreciated. Please let me know if you have further questions. |
Beta Was this translation helpful? Give feedback.
-
Hi @gaoguanlin, we are glad that openbox can help you with your research. For the first question, you are suggested provide a seed_set in the format like Regarding the second question, we have fixed a bug in SafeOpt. Previously, it could only support a two-dimensional search space, but now it supports any dimensionality. We've inherited from BaseAdvisor, aligned the API, and optimized many steps for readability and efficiency. You can now synchronize with our latest changes by installing from the source code. Thank you! |
Beta Was this translation helpful? Give feedback.
-
hi all,
thanks for sharing this great tool! It really helps my research much further.
I am using BO to safely learn and optimize a controller for a complicated test bench. I am trying to use the safeopt_advisor but encountered an error regarding the handling of seed_set code section below.
With the seed set i.e. the safe initial set in np.array format, it reports "float" has no attribute "get array" since a float number is read from the seed array and here the get_array fucntion is imported from configuration_space.py. And with the safe initial set in list format, other problem occurs.
And I notice the advisor_type "safeopt" is not yet registered in "generic_smbo.py" as an option. Is it possible that the code related to "safeopt" is not yet thourougly tested in openbox environment? I am more than happy if I can contribute to the further development of the toolbox, hence the question. And I appreciate your feedback, thanks a lot!
best regards
Guanlin from TU Darmstadt in Germany
Beta Was this translation helpful? Give feedback.
All reactions