Skip to content

Using persis_in field

Stephen Hudson edited this page Dec 21, 2021 · 1 revision

Former defaults (prior to libEnsemble v0.8.0) for returning values to generator in example persistent allocation functions are shown below. These defaults have been removed in v0.8.0 for improved transparency.

These fields, or a subset of them, should now be specified in:

    gen_specs['persis_in']

The example calling scripts show usage of 'persis_in' in v0.8.0 onward.


persistent_aposmm_alloc.py

Alloc func: persistent_aposmm_alloc:

        persis_info['fields_to_give_back'] = ['f'] + [n[0] for n in gen_specs['out']]

        if 'grad' in [n[0] for n in sim_specs['out']]:
            persis_info['fields_to_give_back'] += ['grad']

        if 'fvec' in [n[0] for n in sim_specs['out']]:
            persis_info['fields_to_give_back'] += ['fvec']

Example calling scripts:


start_fd_persistent.py

Alloc func: finite_diff_alloc:

    list(set(gen_specs['in'] + sim_specs['in'] + [n[0] for n in sim_specs['out']] + [('sim_id')]))

Example calling scripts:


start_only_persistent.py

Alloc func: only_persistent_gens:

    sim_specs['in'] + [n[0] for n in sim_specs['out']] + [('sim_id')]

Example calling scripts:


start_persistent_local_opt_gens.py

Alloc func: start_persistent_local_opt_gens:

    sim_specs['in'] + [n[0] for n in sim_specs['out']]

Example calling scripts: