kermitt2 / delft

a Deep Learning Framework for Text

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

new multiprocessing parameter for Sequence and TrainingConfig

bfreuden opened this issue · comments

There are some reports of multiprocessing causing locking problems (with Keras hanging forever):
keras-team/keras#3181
keras-team/keras#10340
keras-team/keras#9964
We encountered this problem when training sequence labelling without ELMo (where multiprocessing is disabled by Delft). To be honest it might be caused by some gloomy Python process fork, but I'm not able to find out why we're having this problem.
Having the possibility to disable multiprocessing would be great.

I will submit a PR today.

Thank you @bfreuden, it's nice to have such a parameter in general (on my side, I've not seen this problem without ELMo).

You're very welcome. We don't have the problem neither when running Delft in command-line. However the problem arises when running Delft in a Python web framework (gunicorn).

Is this solved with PR #72 ?

@lfoppiano yes, that's it