executor.map and named parameter passing

ساخت وبلاگ

I have a case of a function which must be run with a large number of parameter types

# generic function with named parameters
def genericFn(X, y, a_fn ='t', o_fn ='a', l_fn='b', dim=2): ... retu accuracy

I have a list of parameter types

a_fns = ['t', 's', 'r', 'l']
o_fns = ['s', 'a']
l_fns = ['m', 'h', 'l', 'b', 'k', 'p']

How can I pass every possible combination of the functions to the pool

with concurrent.futures.ProcessPoolExecutor() as executor: results_list = executor.map(genericFn, (combinations of named parameters))
back soft...
ما را در سایت back soft دنبال می کنید

برچسب : نویسنده : استخدام کار backsoft بازدید : 260 تاريخ : دوشنبه 13 شهريور 1396 ساعت: 16:28