:py:mod:`fragile.callbacks.memory` ================================== .. py:module:: fragile.callbacks.memory Module Contents --------------- Classes ~~~~~~~ .. autoapisummary:: fragile.callbacks.memory.ReplayMemory .. py:class:: ReplayMemory(max_size, names = None, min_size = None, **kwargs) Bases: :py:obj:`fragile.core.api_classes.Callback` Replay buffer that contains data collected from algorithm runs. .. py:attribute:: name :annotation: = memory .. py:attribute:: _log .. py:method:: __len__() .. py:method:: __repr__() Return repr(self). .. py:method:: setup(swarm) Prepare the component during the setup phase of the :class:`Swarm`. .. py:method:: reset(*args, **kwargs) Delete all the data previously stored in the memory. .. py:method:: after_env() .. py:method:: get_value(name) Get attributes of the memory. .. py:method:: is_ready() Return ``True`` if the number of experiences in the memory is greater than ``min_size``. .. py:method:: get_values() Return a tuple containing the memorized data for all the saved data attributes. .. py:method:: as_dict() .. py:method:: iterate_batches(batch_size, as_dict = True) .. py:method:: iterate_values(randomize = False) Return a generator that yields a tuple containing the data of each state stored in the memory. .. py:method:: append(**kwargs)