From 55faae190a62d2d8a78be32aa64d184730b1a797 Mon Sep 17 00:00:00 2001 From: Skander Moalla <37197319+skandermoalla@users.noreply.github.com> Date: Mon, 8 Jan 2024 16:21:23 +0100 Subject: [PATCH] [BugFix] Fix documentation of threads for batched envs. (#1776) --- torchrl/envs/batched_envs.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/torchrl/envs/batched_envs.py b/torchrl/envs/batched_envs.py index 43d18ddd292..ac23ece8880 100644 --- a/torchrl/envs/batched_envs.py +++ b/torchrl/envs/batched_envs.py @@ -133,11 +133,11 @@ class _BatchedEnv(EnvBase): device for the nested environments, one can keep the overhead to a minimum. num_threads (int, optional): number of threads for this process. - Defaults to the number of workers. - This parameter has no effect for the :class:`~SerialEnv` class. - num_sub_threads (int, optional): number of threads of the subprocesses. Should be equal to one plus the number of processes launched within each subprocess (or one if a single process is launched). + Defaults to the number of workers + 1. + This parameter has no effect for the :class:`~SerialEnv` class. + num_sub_threads (int, optional): number of threads of the subprocesses. Defaults to 1 for safety: if none is indicated, launching multiple workers may charge the cpu load too much and harm performance. This parameter has no effect for the :class:`~SerialEnv` class.