def worker_e_step(input_queue, result_queue):
 logger.debug('worker process entering E-step loop')
 while True:
  logger.debug('getting a new job')
  (chunk_no, chunk, worker_lda) = input_queue.get()
  logger.debug('processing chunk #%i of %i documents', chunk_no, len(chunk))
  worker_lda.state.reset()
  worker_lda.do_estep(chunk)
  del chunk
  logger.debug('processed chunk, queuing the result')
  result_queue.put(worker_lda.state)
  del worker_lda
  logger.debug('result put')

def worker_e_step ( input_queue , result_queue ) : logger . debug ( 'worker process entering E-step loop' ) while True : logger . debug ( 'getting a new job' ) ( chunk_no , chunk , worker_lda ) = input_queue . get ( ) logger . debug ( 'processing chunk #%i of %i documents' , chunk_no , len ( chunk ) ) worker_lda . state . reset ( ) worker_lda . do_estep ( chunk ) del chunk logger . debug ( 'processed chunk, queuing the result' ) result_queue . put ( worker_lda . state ) del worker_lda logger . debug ( 'result put' )
perform e-step for each 3-tuple from the input queue .