You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using extra_outputs from the user_function, I was expecting extra_outputs to be directly usable as context? However in emukit.core.loop.user_function.py, the extra outputs have to be np.ndarrays of at least 2d and so the dictionary of extra_outputs that is returned is of the form {'key0': array([2.1]), 'key1': array([2.]), 'key2': array([1.])}.
By using this dictionary as context, when multiple context values are present, the expend_vector method in core.optimization.context_manager.py fails with a broadcast error because the context_values is no longer 1d.
This is not really an issue, as we can simply process the extra_outputs after getting them from the user_function_result to make them simple values instead of arrays. But I wanted to ask if the requirements for extra_outputs to be 2d numpy arrays is due to some functionality I am missing?
I was expecting the extra_outputs to be directly compatible with context_manager when used as context?
Looking forward to your answer,
Thanks!
The text was updated successfully, but these errors were encountered:
hi @clairecp , could you perhaps supply a code sniped that shows where the code fails? It would be easier for me to understand precisely what you are referring. Thanks!
Hello everyone!
When using extra_outputs from the user_function, I was expecting extra_outputs to be directly usable as context? However in emukit.core.loop.user_function.py, the extra outputs have to be np.ndarrays of at least 2d and so the dictionary of extra_outputs that is returned is of the form {'key0': array([2.1]), 'key1': array([2.]), 'key2': array([1.])}.
By using this dictionary as context, when multiple context values are present, the expend_vector method in core.optimization.context_manager.py fails with a broadcast error because the context_values is no longer 1d.
This is not really an issue, as we can simply process the extra_outputs after getting them from the user_function_result to make them simple values instead of arrays. But I wanted to ask if the requirements for extra_outputs to be 2d numpy arrays is due to some functionality I am missing?
I was expecting the extra_outputs to be directly compatible with context_manager when used as context?
Looking forward to your answer,
Thanks!
The text was updated successfully, but these errors were encountered: