Shortcuts

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

Docs

Access comprehensive developer documentation for PyTorch

View Docs

Tutorials

Get in-depth tutorials for beginners and advanced developers

View Tutorials

Resources

Find development resources and get your questions answered

View Resources