diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index aea9d7e2c40..caa955c3bf0 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -119,6 +119,8 @@ jobs: REF_TYPE=${{ github.ref_type }} REF_NAME=${{ github.ref_name }} + apt-get update + apt-get install rsync -y if [[ "${REF_TYPE}" == branch ]]; then if [[ "${REF_NAME}" == main ]]; then diff --git a/torchrl/modules/tensordict_module/exploration.py b/torchrl/modules/tensordict_module/exploration.py index df947236970..1fe6a86594b 100644 --- a/torchrl/modules/tensordict_module/exploration.py +++ b/torchrl/modules/tensordict_module/exploration.py @@ -312,11 +312,10 @@ def step(self, frames: int = 1) -> None: for _ in range(frames): self.sigma.data.copy_( torch.maximum( - self.sigma_end( - self.sigma - - (self.sigma_init - self.sigma_end) / self.annealing_num_steps - ), - ) + self.sigma_end, + self.sigma + - (self.sigma_init - self.sigma_end) / self.annealing_num_steps, + ), ) def _add_noise(self, action: torch.Tensor) -> torch.Tensor: @@ -946,8 +945,8 @@ def _make_noise_pair( noise = tensordict.get(self.noise_key).clone() steps = tensordict.get(self.steps_key).clone() if is_init is not None: - noise = torch.masked_fill(noise, is_init, 0) - steps = torch.masked_fill(steps, is_init, 0) + noise = torch.masked_fill(noise, expand_right(is_init, noise.shape), 0) + steps = torch.masked_fill(steps, expand_right(is_init, steps.shape), 0) return noise, steps def add_sample(