Non-jit Workflow#

class evox.workflows.NonJitWorkflow[source]#
__init__(algorithm, problem, monitors=[], opt_direction='min', sol_transforms=[], fit_transforms=[], pop_transform=None, monitor=None)[source]#
Parameters:
algorithm

The algorithm.

problem

The problem.

monitor

Optional monitor.

opt_direction

The optimization direction, can be either “min” or “max” or a list of “min”/”max” to specific the direction for each objective.

sol_transforms

Optional candidate solution transform function, usually used to decode the candidate solution into the format that can be understood by the problem. Should be a list of functions, and the functions will be applied in the order of the list.

fit_transforms

Optional fitness transform function. usually used to apply fitness shaping. Should be a list of functions, and the functions will be applied in the order of the list.

Parameters:
  • algorithm (Algorithm)

  • problem (Problem)

  • monitors (List[Monitor])

  • opt_direction (str | List[str])

  • sol_transforms (List[Callable])

  • fit_transforms (List[Callable])

  • pop_transform (Callable | None)

sample(state)[source]#

Sample the algorithm but don’t change it’s state

setup(key)[source]#

Setup mutable state here

The state it self is immutable, but it act as a mutable state by returning new state each time.

Parameters:
key

A PRNGKey.

Returns:
State

The state of this module.