I built a basic .py file with the below command and It goes into this strange behavior, were instead of multi-threading the building of the model, it starts running the program from the top over and over again..
If I take the same program and use just LdaModel it works fine, but is single threaded.
If I run the same program in Jupyter Notebook the multi-threading works..
It is only when I run the program from the command line..
I do not have a "main" function in my program.. If I did, what would I put in it?
It is just confusing to see the multi-threader try to run the entire program from the beginning instead of just this operation?
Is there an example using a main() if that is what I need to do?
lda_model_bagOfWords = gensim.models.LdaMulticore(bow_corpus, num_topics=50, id2word=dictionary, passes=2, workers=12)
Then I get this error
RuntimeError:
An attempt has been made to start a new process before the
current process has finished its bootstrapping phase.
This probably means that you are not using fork to start your
child processes and you have forgotten to use the proper idiom
in the main module:
if __name__ == '__main__':
freeze_support()
...
The "freeze_support()" line can be omitted if the program
is not going to be frozen to produce an executable.