|
133 | 133 | "\t\t\tfor method,mname in tqdm(methods):\n", |
134 | 134 | "\t\t\t\t#best_params, best_rmse = optimize(method, x, dt, dxdt_truth=dxdt_truth, metric='rmse')\n", |
135 | 135 | "\t\t\t\t#best_params, best_ec = optimize(method, x, dt, dxdt_truth=dxdt_truth, metric='error_correlation')\n", |
136 | | - "\t\t\t\tbest_params, best_score = optimize(method, x, dt, tvgamma=tvgamma,\n", |
| 136 | + "\t\t\t\tbest_params, best_score = optimize(method, x, dt, tvgamma=tvgamma, parallel=False,\n", |
137 | 137 | "\t\t\t\t\t\tsearch_space_updates=({'order':{2,3}} if (method in [tvrdiff, robustdiff] and sim != triangle) else {})) # because convex-based with order 1 tends to hack the cost function\n", |
138 | 138 | "\t\t\t\tx_hat, dxdt_hat = method(x, dt, **best_params)\n", |
139 | 139 | "\t\n", |
|
194 | 194 | "\tjobs += [{'dt':0.01, 'cutoff_frequency':3, 'noise_type':'normal', 'noise_params':[0, 0.1],\n", |
195 | 195 | "\t\t\t'noise_scale':1, 'outliers':False, 'random_seed':random_seed} for cutoff_frequency in cutoff_frequencies] # 5\n", |
196 | 196 | "\n", |
197 | | - "with Pool as pool: pool.map(lambda kwargs: main_loop(**kwargs), jobs)" |
| 197 | + "def run(kwargs): main_loop(**kwargs)\n", |
| 198 | + "with Pool() as pool: pool.map(run, jobs)" |
198 | 199 | ] |
199 | 200 | }, |
200 | 201 | { |
|
0 commit comments