Open RMichae1 opened 8 months ago
I like it, were you imagining something like this?:
from poli.objective_repository import DummyBlackBox
f = DummyBlackBox(black_box=lambda x: 0.0)
# then f(whatever) == 0.0, and the logging and other functionalities of black boxes can still be attached and measured?
Exactly like that. +1
to preserve shapes, we would need something like lambda x: np.zeros(len(x)).reshape(1, -1)
, but these are minor details.
We could implement a lambda
black box registration for isolation.
The way to do it would be by asking the user to implement a subclass of AbstractIsolatedFunction
.
Currently we do not provide capabilities to load a custom user-defined function with poli.
We require the user to add any function as an objective to the objective repository. However that may be a large hurdle for initial users of the poli library.
We could consider adding an empty black-box objective/ dummy objective on any available data assets and let the user specify a custom function for f.
This way benchmarking and dev can be done quicker if a callable function object is available for the user without the requirement to make substantial contributions to poli.