pg.evolution.GlobalStateSetter¶
Accessible via pg.evolution.GlobalStateSetter
.
- class GlobalStateSetter(key, value=(MISSING_VALUE,))[source]¶
Bases:
pg.evolution.Operation
Set the value for a key in global_state and return an empty list.
Methods:
call
(inputs, global_state)Subclasses should override this method.
- call(inputs, global_state)[source]¶
Subclasses should override this method.
The global_state and step are optional for the subclasses’ call signature.
- Parameters:
inputs – A list of values as inputs.
global_state – An AttributeDict object as the global state container, which is readable/writable during the operation.
step – Number of examples historically proposed, which can be used for determining a cross over schedule.
- Returns:
A list of values as output of current operation.