framework.middleware.functional.collector¶
collector¶
inferencer¶
- ding.framework.middleware.functional.collector.inferencer(seed: int, policy: Policy, env: BaseEnvManager) Callable [source]¶
- Overview:
The middleware that executes the inference process.
- Arguments:
seed (
int
): Random seed.policy (
Policy
): The policy to be inferred.env (
BaseEnvManager
): The env where the inference process is performed. The env.ready_obs (tnp.array
) will be used as model input.
rolloutor¶
- ding.framework.middleware.functional.collector.rolloutor(policy: Policy, env: BaseEnvManager, transitions: TransitionList, collect_print_freq=100) Callable [source]¶
- Overview:
The middleware that executes the transition process in the env.
- Arguments:
policy (
Policy
): The policy to be used during transition.env (
BaseEnvManager
): The env for the collection, the BaseEnvManager object or its derivatives are supported.transitions (
TransitionList
): The transition information which will be filled in this process, including obs, next_obs, action, logit, value, reward and done.