question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Correct way to send AsyncReplayBuffers to new processes

See original GitHub issue

I’m trying to do multi-GPU DistributedDataParallel training using an AsyncPrioritizedSequenceReplayFrameBuffer, and I’m having trouble passing a buffer created in the parent to child processes. When I directly pass the buffer at initialization I receive the error

   File "/home/schwarzm/anaconda3/envs/pytorch/lib/python3.7/multiprocessing/spawn.py", line 115, in _main
    self = reduction.pickle.load(from_parent)
_pickle.UnpicklingError: NEWOBJ class argument isn't a type object

When I wrap the buffer in a cloudpickle wrapper before passing it, I instead see TypeError: can't pickle mmap.mmap objects.

From what I can tell, the function launch_optimizer_workers is directly passing such a buffer to it the created worker processes via self.algo – is there some trick necessary to make this work? Does each worker need to create a new copy of the buffer at process startup? Launching workers with fork appears to avoid this issue, but it in turn makes it impossible to use CUDA in the child processes.

Issue Analytics

  • State:open
  • Created 4 years ago
  • Comments:9 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
mxwellscommented, Apr 9, 2020

yeah i’d like to, might take sometime cuz i wanna let this extra environment idea lend first 😄

1reaction
mxwellscommented, Apr 1, 2020

cool! it was really helpful.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Alternatives to named(array)tuple? · Issue #99 · astooke/rlpyt · GitHub
where rlpyt dynamically creates new namedtuple or namedarraytuple types and stores them as ... Correct way to send AsyncReplayBuffers to new processes #106....
Read more >
How to Implement New Work Processes Successfully
How do you implement a business process? · 1. Explain the need for the change. Clear communication is essential for a smooth transition...
Read more >
How to implement a new process at work - The Predictive Index
As your company grows, you need to create processes. Here's how to make sure new processes succeed by addressing the people component.
Read more >
Implementation Process: Implementing New Processes and ...
Management teams can help their employees to implement a new business process in five simple ways to maximize their implementation efforts ...
Read more >
Sample Emails to Employees About a New Process: 8 Free ...
Use our sample emails to employees about new processes to inform your employees about changes that affect their work.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found