rlpyt icon indicating copy to clipboard operation
rlpyt copied to clipboard

[Bug report] Parallel sampler hanging on shutdown

Open joel99 opened this issue 3 years ago • 0 comments

Hi,

I recently started using this wonderful library, but have been occasionally experiencing a small quality-of-life issue where parallel.base.ParallelSamplerBase.shutdown hangs after all the workers have finished, but the worker processes don't get joined. (I'm using the GPUSampler for basic, 1-GPU, multi-worker training.) Based on this SO post and seeing some other drain statements in the file, I think adding the following to .shutdown() patches the issue:

drain_queue(self.traj_infos_queue)
drain_queue(self.eval_traj_infos_queue)

Hope this means something to you!

joel99 avatar Oct 11 '21 23:10 joel99