# Path: opentuner/search/plugin.py
# class SearchPlugin(object):
#     @property
#     def priority(self):
#         """control order the plugin hooks gets run in, lower runs first"""
#         return 0
# 
#     def set_driver(self, driver):
#         """called before all other methods"""
#         self.driver = driver
# 
#     def before_main(self): pass
# 
#     def after_main(self):  pass
# 
#     def before_techniques(self): pass
# 
#     def after_techniques(self):  pass
# 
#     def before_results_wait(self): pass
# 
#     def after_results_wait(self):  pass
# 
#     def on_result(self, result):
#         """
#         called once for every new result
#         """
#         pass
# 
#     def on_result_for_technique(self, result, technique):
#         """
#         called right before a result is given to a technique
#         (result may be requested by multiple techniques)
#         """
#         pass
# 
#     def on_new_best_result(self, result):
#         """
#         called whenever the global best result changes
#         """
#         pass


import abc
import argparse
import logging
import os
import random
import sys
from builtins import map
from builtins import next
from builtins import str
from datetime import datetime
from importlib import import_module
from fn import _
from future.utils import with_metaclass
from opentuner.resultsdb.models import *
from .plugin import SearchPlugin
    from .metatechniques import RoundRobinMetaSearchTechnique
            self.name = name
        else:
            self.name = self.default_name()

    def is_ready(self):
        """test if enough data has been gathered to use this technique"""
        return True

    def default_name(self):
        """name of this SearchTechnique uses for display/accounting"""
        return self.__class__.__name__

    def handle_requested_result(self, result):
        """called for each new Result(), requested by this technique"""
        pass

    @abc.abstractmethod
    def set_driver(self, driver):
        """called at start of tuning process"""
        return

    @abc.abstractmethod
    def desired_result(self):
        """
        return at most count resultsdb.models.DesiredResult objects based on past
        performance
        """
        return



# Path: opentuner/search/plugin.py
# class SearchPlugin(object):
#     @property
#     def priority(self):
#         """control order the plugin hooks gets run in, lower runs first"""
#         return 0
# 
#     def set_driver(self, driver):
#         """called before all other methods"""
#         self.driver = driver
# 
#     def before_main(self): pass
# 
#     def after_main(self):  pass
# 
#     def before_techniques(self): pass
# 
#     def after_techniques(self):  pass
# 
#     def before_results_wait(self): pass
# 
#     def after_results_wait(self):  pass
# 
#     def on_result(self, result):
#         """
#         called once for every new result
#         """
#         pass
# 
#     def on_result_for_technique(self, result, technique):
#         """
#         called right before a result is given to a technique
#         (result may be requested by multiple techniques)
#         """
#         pass
# 
#     def on_new_best_result(self, result):
#         """
#         called whenever the global best result changes
#         """
#         pass


# Path: opentuner/search/technique.py
import abc
import argparse
import logging
import os
import random
import sys
from builtins import map
from builtins import next
from builtins import str
from datetime import datetime
from importlib import import_module
from fn import _
from future.utils import with_metaclass
from opentuner.resultsdb.models import *
from .plugin import SearchPlugin
    from .metatechniques import RoundRobinMetaSearchTechnique

            self.name = name
        else:
            self.name = self.default_name()

    def is_ready(self):
        """test if enough data has been gathered to use this technique"""
        return True

    def default_name(self):
        """name of this SearchTechnique uses for display/accounting"""
        return self.__class__.__name__

    def handle_requested_result(self, result):
        """called for each new Result(), requested by this technique"""
        pass

    @abc.abstractmethod
    def set_driver(self, driver):
        """called at start of tuning process"""
        return

    @abc.abstractmethod
    def desired_result(self):
        """
        return at most count resultsdb.models.DesiredResult objects based on past
        performance
        """
        return



class SearchTechnique(SearchPlugin, SearchTechniqueBase):