:py:mod:`fragile.callbacks.data_tracking` ========================================= .. py:module:: fragile.callbacks.data_tracking Module Contents --------------- Classes ~~~~~~~ .. autoapisummary:: fragile.callbacks.data_tracking.StoreInitAction fragile.callbacks.data_tracking.TrackWalkersId fragile.callbacks.data_tracking.KeepBestN .. py:class:: StoreInitAction(swarm = None, param_dict = None, inputs = None, outputs = None) Bases: :py:obj:`fragile.core.api_classes.Callback` The :class:`Walkers` is a data structure that takes care of all the data involved in making a Swarm evolve. .. py:attribute:: name :annotation: = store_init_action .. py:attribute:: default_inputs .. py:attribute:: default_outputs :annotation: = ['init_actions'] .. py:method:: param_dict() :property: Return the dictionary defining all the data attributes that the component requires. .. py:method:: before_env() .. py:class:: TrackWalkersId(swarm = None, param_dict = None, inputs = None, outputs = None) Bases: :py:obj:`fragile.core.api_classes.Callback` The :class:`Walkers` is a data structure that takes care of all the data involved in making a Swarm evolve. .. py:attribute:: default_inputs .. py:attribute:: default_param_dict .. py:method:: update_ids(inactives = True) .. py:method:: after_env() .. py:class:: KeepBestN(n_keep, always_update = False, fix_walkers = True, **kwargs) Bases: :py:obj:`fragile.core.api_classes.Callback` The :class:`Walkers` is a data structure that takes care of all the data involved in making a Swarm evolve. .. py:attribute:: name :annotation: = keep_best_n .. py:method:: setup(swarm) Prepare the component during the setup phase of the :class:`Swarm`. .. py:method:: reset(*args, **kwargs) Reset the internal state of the :class:`SwarmComponent`. :param inplace: Unused. Defaults to True. :type inplace: bool, optional :param root_walker: Set the internal state of the :class:`SwarmComponent` to this value. Defaults to None. :type root_walker: Optional[StateData], optional :param states: Set the internal state of the :class:`SwarmComponent` to this value. Defaults to None. :type states: Optional[StateData], optional :param kwargs: Other parameters required to reset the component. .. py:method:: before_walkers() .. py:method:: get_topk_walkers() .. py:method:: update_top_walkers() .. py:method:: fix_topk_walkers() .. py:method:: after_walkers()