jansel/opentuner

Search continuation after stop

Opened this issue · 4 comments

Really a question, not an issue...
If a search has to stop for some reason, is there a way to have it continue from where it left off?

That depends on what you mean by "where it left off". Any state held by the techniques (e.g., the current population of a genetic algorithm) is lost when the tuning run ends, because it isn't saved in the database. But you can use the --seed-configuration option (or override MeasurementInterface.seed_configurations()) to have OpenTuner start with specific configurations. Starting with the top N configurations from the last tuning run gives most of the benefit of resuming a tuning run (or maybe the N most distinct configurations in the top M%, to preserve diversity).

You'd have to get the configurations out of the database, either with the ORM layer or by directly opening the database. For the latter, see the mario example -- you'd want to select the top N configurations instead of the new-best configurations. Then write the resulting dictionaries as JSON files and pass those to --seed-configurations.

Can someone explain the difference between a single seed configuration and multiple seed configurations. When would the 2nd and following seed configurations get used?

OpenTuner will evaluate all seed configurations before asking the techniques for any configurations. See SearchDriver.run_generation_techniques(). Then instead of (or in addition to) starting from random configurations, techniques can incorporate the seed configurations in the same way they mix in the best configurations found by other techniques during a tuning run.

I need to learn more about opentuner internals, but do seeded configurations also act as starting points for mutations? What would be a reasonable value for N in your suggestion to "select the top N configurations instead of the new-best configurations"