(self, n_iterations=1, min_n_workers=1, iteration_kwargs = {},)
return Result([copy.deepcopy(i.data) for i in self.iterations] + ws_data, self.config)
run n_iterations of SuccessiveHalving

		Parameters
		----------
		n_iterations: int
			number of iterations to be performed in this run
		min_n_workers: int
			minimum number of workers before starting the run
run n_iterations of SuccessiveHalving
run n_iterations of SuccessiveHalving
def run(self, n_iterations=1, min_n_workers=1, iteration_kwargs = {},):
		"""
			run n_iterations of SuccessiveHalving

		Parameters
		----------
		n_iterations: int
			number of iterations to be performed in this run
		min_n_workers: int
			minimum number of workers before starting the run
		"""

		self.wait_for_workers(min_n_workers)
		
		iteration_kwargs.update({'result_logger': self.result_logger})

		if self.time_ref is None:
			self.time_ref = time.time()
			self.config['time_ref'] = self.time_ref
		
			self.logger.info('HBMASTER: starting run at %s'%(str(self.time_ref)))

		self.thread_cond.acquire()
		while True:

			self._queue_wait()
			
			next_run = None
			# find a new run to schedule
			for i in self.active_iterations():
				next_run = self.iterations[i].get_next_run()
				if not next_run is None: break

			if not next_run is None:
				self.logger.debug('HBMASTER: schedule new run for iteration %i'%i)
				self._submit_job(*next_run)
				continue
			else:
				if n_iterations > 0:	#we might be able to start the next iteration
					self.iterations.append(self.get_next_iteration(len(self.iterations), iteration_kwargs))
					n_iterations -= 1
					continue

			# at this point there is no imediate run that can be scheduled,
			# so wait for some job to finish if there are active iterations
			if self.active_iterations():
				self.thread_cond.wait()
			else:
				break

		self.thread_cond.release()
		
		for i in self.warmstart_iteration:
			i.fix_timestamps(self.time_ref)
			
		ws_data = [i.data for i in self.warmstart_iteration]
		
		return Result([copy.deepcopy(i.data) for i in self.iterations] + ws_data, self.config)
def run ( self , n_iterations = 1 , min_n_workers = 1 , iteration_kwargs = { } , ) : self . wait_for_workers ( min_n_workers ) iteration_kwargs . update ( { 'result_logger' : self . result_logger } ) if self . time_ref is None : self . time_ref = time . time ( ) self . config [ 'time_ref' ] = self . time_ref self . logger . info ( 'HBMASTER: starting run at %s' % ( str ( self . time_ref ) ) ) self . thread_cond . acquire ( ) while True : self . _queue_wait ( ) next_run = None # find a new run to schedule for i in self . active_iterations ( ) : next_run = self . iterations [ i ] . get_next_run ( ) if not next_run is None : break if not next_run is None : self . logger . debug ( 'HBMASTER: schedule new run for iteration %i' % i ) self . _submit_job ( * next_run ) continue else : if n_iterations > 0 : #we might be able to start the next iteration self . iterations . append ( self . get_next_iteration ( len ( self . iterations ) , iteration_kwargs ) ) n_iterations -= 1 continue # at this point there is no imediate run that can be scheduled, # so wait for some job to finish if there are active iterations if self . active_iterations ( ) : self . thread_cond . wait ( ) else : break self . thread_cond . release ( ) for i in self . warmstart_iteration : i . fix_timestamps ( self . time_ref ) ws_data = [ i . data for i in self . warmstart_iteration ] return Result ( [ copy . deepcopy ( i . data ) for i in self . iterations ] + ws_data , self . config )