Proper way to shut down sub-processes in a dataloader #16214
-
Hello, I have a dataloader (with I can iterate the dataloader manually like this and everything works fine: class MyIterableDataset():
def __iter__(self):
try:
processes = [mp.Process(...) for _ in range(8)]
yield ...
finally:
process.terminate()
process.join()
dataloader = Dataloader(MyIterableDataset())
for epoch in range(2):
for batch in dataloader:
pass I simply use the Thanks |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
The issue was not related to pytorch lightning Turns out the BrokenPipe was caused by me shutting down the queue manager before shutting down the processes |
Beta Was this translation helpful? Give feedback.
The issue was not related to pytorch lightning
Turns out the BrokenPipe was caused by me shutting down the queue manager before shutting down the processes