Skip to content
Discussion options

You must be logged in to vote

Short version: I would not go down the non-daemonic road. Even if you get it working, it mostly will not buy you the speedup you are after, and there are two cleaner ways out.

Why the error exists. The AssertionError is not TorchRL policy, it is Python itself: the multiprocessing docs state that a daemonic process is not allowed to create child processes, precisely so nobody has to reap orphaned grandchildren when a worker dies. Subclassing ParallelEnv to make workers non-daemonic means you inherit that reaping job, which is the risk you already identified.

Why it would not help anyway. With N parallel envs each running num_workers=4, you have 4N processes queued against one storage devic…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@tlt18
Comment options

Answer selected by tlt18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants