trinity.algorithm.sample_strategy package#
Submodules#
Module contents#
- class trinity.algorithm.sample_strategy.SampleStrategy(buffer_config: BufferConfig, **kwargs)[源代码]#
基类:
ABC- __init__(buffer_config: BufferConfig, **kwargs) None[源代码]#
- abstractmethod classmethod default_args() dict[源代码]#
Get the default arguments of the sample strategy.
- abstractmethod load_state_dict(state_dict: dict) None[源代码]#
Load the state dict of the sample strategy.
- abstractmethod async sample(step: int) Tuple[List[Experience], Dict, List][源代码]#
Sample data from buffer.
- 参数:
step (int) -- The step number of current step.
- 返回:
The sampled List[Experience] data. Dict: Metrics for logging. List: Representative data for logging.
- 返回类型:
List[Experience]
- set_model_version_metric(exp_list: List[Experience], metrics: Dict)[源代码]#