make_collector_onpolicy¶
- torchrl.trainers.helpers.make_collector_onpolicy(make_env: Callable[[], EnvBase], actor_model_explore: Union[TensorDictModuleWrapper, ProbabilisticTensorDictSequential], cfg: DictConfig, make_env_kwargs: Optional[Dict] = None) DataCollectorBase [source]¶
Makes a collector in on-policy settings.
- Parameters:
make_env (Callable) – environment creator
actor_model_explore (SafeModule) – Model instance used for evaluation and exploration update
cfg (DictConfig) – config for creating collector object
make_env_kwargs (dict) – kwargs for the env creator