Rate this Page

make_collector_offpolicy#

torchrl.trainers.helpers.make_collector_offpolicy(make_env: Callable[[], EnvBase], actor_model_explore: TensorDictModuleWrapper | ProbabilisticTensorDictSequential, cfg: DictConfig, make_env_kwargs: dict | None = None) BaseCollector[source]#

Returns a data collector for off-policy sota-implementations.

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