Skip to content Skip to sidebar Skip to footer

Processpoolexecutor Don't Execute

I try to get ARIMA configuration some faster that I acctually do. So I use a Iterate method to compare all ARIMA combinations to select better. For that I create a function to Iter

Solution 1:

I wouldn't expect the second block of code you've shown to do anything. For this code:

# evaluate combinations of p, d and q values for an ARIMA model
orders = []
defevaluate_models( p_values, d_values, q_values):
    
    for p in p_values:
        for d in d_values:
            for q in q_values:
                order = (p,d,q)
                orders.append(order)

with concurrent.futures.ProcessPoolExecutor() as executor:
    results = [executor.submit(evaluate_arima_model, (dataset, order)) for order in orders]
    for f in concurrent.futures.as_completed(results):
        print(f.result())
        try:
            f.result()
        except:
            continueelse:
            print(f.result())

orders will always be empty because you are declaring it so and then never calling evaluate_models, or anything else that could be putting objects into orders. Since orders is empty, no processes will be registered to run, and results will also be empty, and so this code won't do anything. Do you mean to call evaluate_models before you do with concurrent.futures....?

Post a Comment for "Processpoolexecutor Don't Execute"