Skip to content

Commit

Permalink
Daemonize TensorFlow child processes.
Browse files Browse the repository at this point in the history
Required in order to let the training code exit cleanly when finished.
  • Loading branch information
gcp committed Apr 3, 2018
1 parent 7f8ff14 commit 00a4357
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion training/tf/chunkparser.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,8 @@ def __init__(self, chunkdatasrc, shuffle_size=1, sample=1, buffer_size=1, batch_
for _ in range(workers):
read, write = mp.Pipe(duplex=False)
mp.Process(target=self.task,
args=(chunkdatasrc, write)).start()
args=(chunkdatasrc, write),
daemon=True).start()
self.readers.append(read)
write.close()
self.init_structs()
Expand Down

0 comments on commit 00a4357

Please sign in to comment.