metawards.extractors.extract_custom¶
-
metawards.extractors.
extract_custom
(custom_function, setup=False, **kwargs)[source]¶ This returns the default list of ‘output_XXX’ functions that are called in sequence to extract data after each iteration of the model run.
This extractor provides a custom extractor that uses ‘custom_function’ passed from the user. This extractor makes sure that ‘setup’ is called correctly and that the functions needed by ‘extract_core’ are called first.
Parameters: - custom_function – A custom user-supplied function that returns the functions that the user would like to be called for each step.
- setup (bool) – Whether or not to return the functions used to setup the space and input for the output_XXX functions returned by this extractor. This is called once at the start of a run to return the functions that must be called to setup the output. Note that most extractors don’t need any setup.
Returns: funcs – The list of functions that
`extract`
will call in sequenceReturn type: List[function]