Parallel optimization on 3 classical objective functions: sphere, rastrigin, cigar. The number of workers is 20 % of the budget. Testing both no useless variables and 5/6 of useless variables.
(seed: tp.Optional[int] = None)
| 1250 | |
| 1251 | @registry.register |
| 1252 | def parallel(seed: tp.Optional[int] = None) -> tp.Iterator[Experiment]: |
| 1253 | """Parallel optimization on 3 classical objective functions: sphere, rastrigin, cigar. |
| 1254 | The number of workers is 20 % of the budget. |
| 1255 | Testing both no useless variables and 5/6 of useless variables.""" |
| 1256 | seedg = create_seed_generator(seed) |
| 1257 | names = ["sphere", "rastrigin", "cigar"] |
| 1258 | optims: tp.List[str] = get_optimizers("parallel_basics", seed=next(seedg)) # type: ignore |
| 1259 | functions = [ |
| 1260 | ArtificialFunction(name, block_dimension=bd, useless_variables=bd * uv_factor) |
| 1261 | for name in names |
| 1262 | for bd in [25] |
| 1263 | for uv_factor in [0, 5] |
| 1264 | ] |
| 1265 | optims = refactor_optims(optims) |
| 1266 | for func in functions: |
| 1267 | for optim in optims: |
| 1268 | for budget in [30, 100, 3000]: |
| 1269 | yield Experiment(func, optim, budget=budget, num_workers=int(budget / 5), seed=next(seedg)) |
| 1270 | |
| 1271 | |
| 1272 | @registry.register |
nothing calls this directly
no test coverage detected
searching dependent graphs…