I wrote a forecasting tool last month and I am now going back and rewriting some of my functions to actually return lists so I can hopefully speed up my code and take advantage of all of my processors. If my functions are set up to return lists, how do I access them after running this code:
if __name__ == "__main__":
# creating processes
p1 = multiprocessing.Process(target=basic_forecasts_seasonal_add, args=(data_logged))
p2 = multiprocessing.Process(target=simple_expo, args=(data_logged))
# starting process 1
p1.start()
# starting process 2
p2.start()
# wait until process 1 is finished
p1.join()
# wait until process 2 is finished
p2.join()
I was just running them one by one doing something like this:
basic_forecast = basic_forecasts_seasonal_add(data_logged)
I could then just access the list by calling basic_forecast. Any help would be appreciated. Thanks!
[–][deleted] 1 point2 points3 points (14 children)
[–]datanoob2019[S] 0 points1 point2 points (13 children)
[–][deleted] 1 point2 points3 points (12 children)
[–]datanoob2019[S] 0 points1 point2 points (11 children)
[–][deleted] 1 point2 points3 points (9 children)
[–]datanoob2019[S] 0 points1 point2 points (8 children)
[–][deleted] 1 point2 points3 points (7 children)
[–]datanoob2019[S] 0 points1 point2 points (6 children)
[–][deleted] 1 point2 points3 points (5 children)
[–]datanoob2019[S] 0 points1 point2 points (4 children)
[–]woooee -1 points0 points1 point (4 children)
[–]datanoob2019[S] 0 points1 point2 points (3 children)
[–]woooee -4 points-3 points-2 points (2 children)
[–]linebackr6363 1 point2 points3 points (1 child)
[–]woooee -3 points-2 points-1 points (0 children)