How to use the opentuner.measurement.inputmanager.FixedInputManager 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 jbosboom / streamjit / lib / opentuner / streamjit / tuner3.py View on Github external
# The default bandit, plus our custom techniques.
	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()
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 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 / examples / petabricks / pbtuner.py View on Github external
def __init__(self, args):
    self.program_settings = json.load(open(args.program_settings))
    input_manager = FixedInputManager(size=self.program_settings['n'])
    objective = ThresholdAccuracyMinimizeTime(self.program_settings['accuracy'])

    # pass many settings to parent constructor
    super(PetaBricksInterface, self).__init__(
        args, program_name=args.program,
        program_version=self.file_hash(args.program),
        input_manager=input_manager, objective=objective)
github jansel / opentuner / opentuner / measurement / interface.py View on Github external
def input_manager(self):
    """
    called once to create the measurement.inputmanager.InputManager
    """
    if self._objective is None:
      from .inputmanager import FixedInputManager

      return FixedInputManager()
    return self._input_manager
github jansel / opentuner / opentuner / measurement / inputmanager.py View on Github external
def __init__(self,
               input_class_name='fixed',
               size=-1,
               path=None,
               extra=None):
    self.input_class_name = input_class_name
    self.size = size
    self.path = path
    self.extra = extra
    self.the_input = None
    super(FixedInputManager, self).__init__()
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()