Example #1
0
def run_mloop():
    '''
    M-LOOP Launcher
    
    Starts an instance of M-LOOP configured using a configuration file. 
    
    Takes the following command line options
    
    -c filename for configuration file
    
    -h display help
    
    the default name for the configuration is "ExpConfig.txt"
    '''

    parser = argparse.ArgumentParser(
        description='M-LOOP Launcher \n Version:' + ml.__version__ +
        '\n \n Starts a new instance of M-LOOP based a on configuration file.',
        formatter_class=argparse.RawDescriptionHelpFormatter)
    parser.add_argument('-c',
                        '--configFile',
                        default='exp_config.txt',
                        help='Filename of configuration file.')
    parser.add_argument('-v',
                        '--version',
                        action='version',
                        version=ml.__version__)

    args = parser.parse_args()

    config_filename = args.configFile

    _ = mll.launch_from_file(config_filename)
Example #2
0
def run_mloop():
    '''
    M-LOOP Launcher
    
    Starts an instance of M-LOOP configured using a configuration file. 
    
    Takes the following command line options
    
    -c filename for configuration file
    
    -h display help
    
    the default name for the configuration is "ExpConfig.txt"
    '''
    
    parser = argparse.ArgumentParser(description='M-LOOP Launcher \n Version:' + ml.__version__+'\n \n Starts a new instance of M-LOOP based a on configuration file.', 
                                     formatter_class=argparse.RawDescriptionHelpFormatter)
    parser.add_argument('-c','--configFile',default='exp_config.txt',help='Filename of configuration file.')
    parser.add_argument('-v','--version', action='version', version=ml.__version__)
    
    args = parser.parse_args()
    
    config_filename = args.configFile
    
    _ = mll.launch_from_file(config_filename)

        
Example #3
0
 def test_controller_config(self):
     controller = mll.launch_from_file(mlu.mloop_path +
                                       '/../examples/controller_config.txt',
                                       interface_type='test',
                                       no_delay=False,
                                       **self.override_dict)
     self.asserts_for_cost_and_params(controller)
Example #4
0
 def test_shell_interface_config(self):
     controller = mll.launch_from_file(mlu.mloop_path+'/../examples/shell_interface_config.txt',
                                       num_params=1,
                                       target_cost = 0.1,
                                       no_delay = False,
                                       **self.override_dict)
     self.asserts_for_cost_and_params(controller)
Example #5
0
 def test_shell_interface_config(self):
     controller = mll.launch_from_file(mlu.mloop_path+'/../examples/shell_interface_config.txt',
                                       num_params=1,
                                       target_cost = 0.1,
                                       no_delay = False,
                                       **self.override_dict)
     self.asserts_for_cost_and_params(controller)
Example #6
0
 def test_differential_evolution_complete_config(self):
     controller = mll.launch_from_file(
         mlu.mloop_path +
         '/../examples/differential_evolution_complete_config.txt',
         interface_type='test',
         **self.override_dict)
     self.asserts_for_cost_and_params(controller)
Example #7
0
 def test_tutorial_config(self):
     fake_experiment = mlt.FakeExperiment()
     fake_experiment.start()
     controller = mll.launch_from_file(mlu.mloop_path+'/../examples/tutorial_config.txt',
                                       **self.override_dict)
     self.asserts_for_cost_and_params(controller)
     fake_experiment.end_event.set()
     fake_experiment.join()
Example #8
0
 def test_tutorial_config(self):
     fake_experiment = mlt.FakeExperiment()
     fake_experiment.start()
     controller = mll.launch_from_file(mlu.mloop_path+'/../examples/tutorial_config.txt',
                                       **self.override_dict)
     self.asserts_for_cost_and_params(controller)
     fake_experiment.end_event.set()
     fake_experiment.join()
Example #9
0
 def test_logging_config(self):
     controller = mll.launch_from_file(mlu.mloop_path+'/../examples/logging_config.txt',
                                       num_params=1,
                                       min_boundary = [-1.0],
                                       max_boundary = [1.0],
                                       target_cost = 0.1,
                                       interface_type = 'test',
                                       no_delay = False, 
                                       **self.override_dict)
     self.asserts_for_cost_and_params(controller)
Example #10
0
 def test_file_interface_config(self):
     fake_experiment = mlt.FakeExperiment()
     fake_experiment.start()
     controller = mll.launch_from_file(mlu.mloop_path+'/../examples/file_interface_config.txt',
                                       num_params=1,
                                       target_cost = 0.1,
                                       **self.override_dict)
     self.asserts_for_cost_and_params(controller)
     fake_experiment.end_event.set()
     fake_experiment.join()
Example #11
0
 def test_logging_config(self):
     controller = mll.launch_from_file(mlu.mloop_path+'/../examples/logging_config.txt',
                                       num_params=1,
                                       min_boundary = [-1.0],
                                       max_boundary = [1.0],
                                       target_cost = 0.1,
                                       interface_type = 'test',
                                       no_delay = False,
                                       **self.override_dict)
     self.asserts_for_cost_and_params(controller)
Example #12
0
 def test_file_interface_config(self):
     fake_experiment = mlt.FakeExperiment()
     fake_experiment.start()
     controller = mll.launch_from_file(mlu.mloop_path+'/../examples/file_interface_config.txt',
                                       num_params=1,
                                       target_cost = 0.1,
                                       **self.override_dict)
     self.asserts_for_cost_and_params(controller)
     fake_experiment.end_event.set()
     fake_experiment.join()
Example #13
0
 def test_nelder_mead_complete_config(self):
     controller = mll.launch_from_file(
         mlu.mloop_path + '/../examples/nelder_mead_complete_config.txt',
         interface_type='test',
         **self.override_dict)
     self.asserts_for_cost_and_params(controller)
Example #14
0
 def test_random_complete_config(self):
     _ = mll.launch_from_file(mlu.mloop_path +
                              '/../examples/random_complete_config.txt',
                              interface_type='test',
                              **self.override_dict)
Example #15
0
 def test_gaussian_process_complete_config(self):
     controller = mll.launch_from_file(mlu.mloop_path+'/../examples/gaussian_process_complete_config.txt',
                                       interface_type = 'test',
                                       no_delay = False, 
                                       **self.override_dict)
     self.asserts_for_cost_and_params(controller)
Example #16
0
 def test_differential_evolution_complete_config(self):
     controller = mll.launch_from_file(mlu.mloop_path+'/../examples/differential_evolution_complete_config.txt',
                                       interface_type = 'test',
                                       **self.override_dict)
     self.asserts_for_cost_and_params(controller)
Example #17
0
 def test_nelder_mead_complete_config(self):
     controller = mll.launch_from_file(mlu.mloop_path+'/../examples/nelder_mead_complete_config.txt',
                                       interface_type = 'test',
                                       **self.override_dict)
     self.asserts_for_cost_and_params(controller)
Example #18
0
 def test_random_complete_config(self):
     _ = mll.launch_from_file(mlu.mloop_path+'/../examples/random_complete_config.txt', 
                              interface_type = 'test',
                              **self.override_dict)