def learn(self, model: BaseAlgorithm) -> None:
        """
        :param model: an initialized RL model
        """
        kwargs: dict[str, Any] = {}
        # log_interval == -1 -> default
        # < -2 -> no auto-logging
        if self.log_interval > -1:
            kwargs = {"log_interval": self.log_interval}
        elif self.log_interval < -1:
            # Deactivate auto-logging, helpful when using callback like LogEveryNTimesteps
            kwargs = {"log_interval": None}

        if len(self.callbacks) > 0:
            kwargs["callback"] = self.callbacks

        # Special case for ARS
        if self.algo == "ars" and self.n_envs > 1:
            kwargs["async_eval"] = AsyncEval(
                [lambda: self.create_envs(n_envs=1, no_log=True) for _ in range(self.n_envs)], model.policy
            )

        try:
            model.learn(self.n_timesteps, **kwargs)
        except KeyboardInterrupt:
            # this allows to save the model when interrupting training
            pass
        finally:
            # Clean progress bar
            if len(self.callbacks) > 0:
                self.callbacks[0].on_training_end()
            # Release resources
            try:
                assert model.env is not None
                model.env.close()
            except EOFError:
                pass

        :param model: an initialized RL model
        
rl_zoo3/exp_manager.py