Closed rhiever closed 8 years ago
Looks like Monte Carlo Search Tree would be helpful. Give a time constraint, the system could get the best results within that time. AlphaGO is using this method.
Could I take up this ticket? seems like a good way for me to delve into more tpot internals
Sounds good, @drorasaf! I'll mark the issue as being worked on.
Currently, TPOT allows users to specify the number of GP generations to run optimization for. This makes sense for users who are experienced with GP, but not so much for the general user.
We should allow for an optional parameter to be passed to TPOT that specifies how much time (in minutes) TPOT has to optimize the pipeline, and TPOT will end prematurely when that time is reached. This parameter will obviously override the
generations
parameter, unless the specified number of generations is reached first.Here's how I picture this feature working:
1) When
fit()
is called, record the starting time at the very beginning of the call.2) At the beginning of every
_evaluate_individual()
call, check the current total time that TPOT has been running. If that time exceeds the user-specified time, print a warning to the user that time has been exceeded and raise aSystemExit
exception. TPOT is already designed to shut down gracefully onSystemExit
andKeyboardInterrupt
calls.It's possible that TPOT will have to end a little earlier than the specified time because is still has to evaluate a handful of pipelines at the end. Perhaps we can optimize the graceful shutdown procedure to use the already-stored fitness values in the Individual object.