How to use the opentuner.tuningrunmain.TuningRunMain function in opentuner

To help you get started, we’ve selected a few opentuner examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github jansel / opentuner / opentuner / api.py View on Github external
from datetime import datetime
from opentuner import tuningrunmain


class TuningRunManager(tuningrunmain.TuningRunMain):
  """
  This class manages a tuning run in a "slave" configuration, where main()
  is controlled by an another program.
  """
  def __init__(self, measurement_interface, args, **kwargs):
    super(TuningRunManager, self).__init__(measurement_interface, args, **kwargs)
    self.init()
    self.tuning_run.state = 'RUNNING'
    self.commit(force=True)
    self.search_driver.external_main_begin()

  def get_next_desired_result(self):
    """
    Returns a opentuner.resultsdb.DesiredResult that should be tested next.
    """
    dr = self.measurement_driver.query_pending_desired_results().first()
github jbosboom / streamjit / lib / opentuner / streamjit / tuner.py View on Github external
def main(args, cfg, ss):
	logging.basicConfig(level=logging.INFO)
	manipulator = ConfigurationManipulator()

	params = cfg.getAllParameters()
	print "\nFeature variables...."
	for key in params.keys():
		print "\t", key
  		manipulator.add_parameter(cfg.getParameter(key))
	
	mi = StreamJitMI(args, ss, manipulator, FixedInputManager(),
                    MinimizeTime())

	m = TuningRunMain(mi, args)
	m.main()
github jbosboom / streamjit / lib / opentuner / streamjit / onlinetuner.py View on Github external
def main(args, cfg, ss):
	logging.basicConfig(level=logging.INFO)
	manipulator = ConfigurationManipulator()

	params = cfg.getAllParameters()
	#print "\nFeature variables...."
	for key in params.keys():
		#print "\t", key
  		manipulator.add_parameter(cfg.getParameter(key))
	
	mi = StreamJitMI(args, ss, manipulator, FixedInputManager(),
                    MinimizeTime())

	m = TuningRunMain(mi, args)
	m.main()
github jansel / opentuner / opentuner / tuningrunmain.py View on Github external
def main(interface, args, *pargs, **kwargs):
  if inspect.isclass(interface):
    interface = interface(args=args, *pargs, **kwargs)
  return TuningRunMain(interface, args).main()
github jbosboom / streamjit / lib / opentuner / streamjit / tuner2.py View on Github external
def main(args, cfg, jvmOptions):
	logging.basicConfig(level=logging.INFO)
	manipulator = ConfigurationManipulator()

	params = dict(cfg.items() + jvmOptions.items())
	#print "\nFeature variables...."
	for key in params.keys():
		#print "\t", key
  		manipulator.add_parameter(params.get(key))
	
	mi = StreamJitMI(args,jvmOptions, manipulator, FixedInputManager(),
                    MinimizeTime())

	m = TuningRunMain(mi, args)
	m.main()
github jansel / opentuner / opentuner / measurement / interface.py View on Github external
def main(cls, args, *pargs, **kwargs):
    from opentuner.tuningrunmain import TuningRunMain

    return TuningRunMain(cls(args, *pargs, **kwargs), args).main()
github jbosboom / streamjit / lib / opentuner / streamjit / tuner3.py View on Github external
from opentuner.search import technique, bandittechniques, differentialevolution, evolutionarytechniques, simplextechniques
	technique.register(bandittechniques.AUCBanditMetaTechnique([
			sjtechniques.FixedTechnique(seed_configs),
			differentialevolution.DifferentialEvolutionAlt(),
			evolutionarytechniques.UniformGreedyMutation(),
			evolutionarytechniques.NormalGreedyMutation(mutation_rate=0.3),
			simplextechniques.RandomNelderMead(),
			sjtechniques.ForceRemove(),
			sjtechniques.ForceFuse(),
			sjtechniques.ForceUnbox(),
			sjtechniques.ForceEqualDivision(),
			sjtechniques.CrossSocketBeforeHyperthreadingAffinity(),
		], name = "StreamJITBandit"))

	mi = StreamJITMI(args, cfg, jvm_options, manipulator, FixedInputManager(), MinimizeTime())
	m = TuningRunMain(mi, args)
	m.main()