def reallocate_replay_pool(self, new_size: int) -> None: """Reset buffer Args: new_size (int): new maximum buffer size. """ assert new_size != self.replay_pool.capacity, "Error, you've tried to allocate a new pool which has the same length" new_replay_pool = ReplayPool(capacity=new_size) new_replay_pool.initialise(self.replay_pool) self.replay_pool = new_replay_pool
def reallocate_replay_pool(self, new_size: int): assert new_size != self.replay_pool.capacity, "Error, you've tried to allocate a new pool which has the same length" new_replay_pool = ReplayPool(capacity=new_size) new_replay_pool.initialise(self.replay_pool) self.replay_pool = new_replay_pool