I would like to train a machine learning model with Python several times and pick the best one from them. Firstly I run the following sequential version and everything works fine:
for item in range(num_of_trainings):
temp_list_of_models[item].train()
And I want to run them in parallel by running
for item in range(num_of_trainings):
task_list[item] = Process(target = temp_list_of_models[item].train)
task_list[item].start()
map(lambda x: x.join(), task_list)
But the problem is this version does not seem to train models in temp_list_of_models at all and all objects in them are stayed unchanged. I am wondering if anyone has idea what the problem might be?
Thanks!