def __create_folder(self, stamp_unique=True): """Create the experiment folder (iterate if necessary). * create unique folder if timestamp is requested * export experiment configuration to the folder """ if 'path_out' not in self.params: raise ValueError('missing "path_out" among %r' % self.params.keys()) # create results folder for experiments path_exp = create_experiment_folder( self.params.get('path_out'), self.__class__.__name__, self.params.get('name'), stamp_unique ) self.params['path_exp'] = path_exp save_config_yaml(os.path.join(path_exp, self.NAME_CONFIG_YAML), self.params)
def test_benchmark_template(self): """ test run in single thread """ path_config = os.path.join(self.path_out, 'sample_config.yaml') save_config_yaml(path_config, {}) params = { 'path_table': PATH_CSV_COVER_MIX, 'path_out': self.path_out, 'path_config': path_config, 'nb_workers': 2, 'unique': False, 'visual': True, } benchmark = BmTemplate(params) benchmark.run() self.check_benchmark_results( benchmark, final_means=[28., 68., 73., 76., 95.], final_stds=[1., 13., 28., 28., 34.] ) os.remove(path_config)