Make a Target Algorithm runner that works directly with python functions
Currently the Scenario needed to create an SMBO instance directly requires parsed command line arguments and parses a pcs file. Furthermore the code assumes that the target algorithm will be a file that is executed (and results are shoved through a pipe).
Both of these are often not the case, as a result we had to specialize Scenario in auto-sklearn and in other places. This is not really user friendly. We probably way to to have a scenario sub-class that can be instantiated solely within python without external files.
What is more important though is that we need a runner that can directly execute python functions.
Comments (4)
-
-
reporter Hey, sorry for the delays, I just now finally ticked that I should get emails when you respond to my issues etc. What you wrote above seems reasonable to me :), I'll have a look at it later this week but as long as there is a way to pass something callable that should be fine. One question out of curiosity: The "pythonic" way to solve such things would be to have all tae runner objects implement a call() function, then you could simply checked if the object that you are passed is a callable object (which would include TAE runners and python functions) and simply evaluate them. Is there a specific reason the runner stuff is setup like it is or is this mainly to have the code be similar to the standard/older SMAC ? Cheers, Tobi
-
Hi Tobi,
had you a look in the meantime?
The "pythonic" way to solve such things would be to have all tae runner objects implement a call() function
Good idea. Could you please generate a pull request with your proposed approach?
Cheers, Marius
-
since there is no progress on this issue and no one seems to care, I changed it a minor proposal.
- Log in to comment
Hi,
I moved now the tae runner into the scenario and added an argument such that you can give him your own object of an tae runner which could be an arbitrary python function. The only restriction is that it has also to implement the run method as we did in the already existing tae runner objects.
Furthermore, the scenario gets now either a string (representing a scenario file path) or a dictionary such that you don't the external files anymore.
I hope this helps!?
Best, Marius