trinity.algorithm.sample_strategy package#
Submodules#
Module contents#
- class trinity.algorithm.sample_strategy.SampleStrategy(buffer_config: BufferConfig, **kwargs)[source]#
Bases:
ABC- __init__(buffer_config: BufferConfig, **kwargs) None[source]#
- abstractmethod classmethod default_args() dict[source]#
Get the default arguments of the sample strategy.
- abstractmethod load_state_dict(state_dict: dict) None[source]#
Load the state dict of the sample strategy.
- abstractmethod async sample(step: int) Tuple[Experiences, Dict, List][source]#
Sample data from buffer.
- Parameters:
step (int) – The step number of current step.
- Returns:
The sampled Experiences data. Dict: Metrics for logging. List: Representative data for logging.
- Return type:
Experiences
- set_model_version_metric(exp_list: List[Experience], metrics: Dict)[source]#