trinity.buffer.operators package#

Subpackages#

Submodules#

Module contents#

class trinity.buffer.operators.ExperienceOperator[源代码]#

基类:ABC

Base class for all experience operators in the Trinity framework. Operators are used to process experiences and perform some transformations based on them.

close()[源代码]#

Close the operator if it has any resources to release.

classmethod create_operators(operator_configs: List[OperatorConfig]) List[ExperienceOperator][源代码]#

Create a list of ExperienceOperator instances based on the provided operator configurations.

参数:

operator_configs (List[OperatorConfig]) -- List of operator configurations.

返回:

List of instantiated ExperienceOperator objects.

返回类型:

List[ExperienceOperator]

abstractmethod process(exps: List[Experience]) Tuple[List[Experience], Dict][源代码]#

Process a list of experiences and return a transformed list.

参数:

exps (List[Experience]) -- List of experiences to process, which contains all experiences generated by the Explorer in one explore step.

返回:

A tuple containing the processed list of experiences and a dictionary of metrics.

返回类型:

Tuple[List[Experience], Dict]