stable-baselines3 icon indicating copy to clipboard operation
stable-baselines3 copied to clipboard

set_parameters() listed as load_parameters() in documentation.

Open aborger opened this issue 4 years ago • 1 comments

📚 Documentation

The documentation defines the set_parameters() method for TD3 as load_parameters().

Following the documentation results in AttributeError: 'TD3' object has no attribute 'load_parameters'

import gym
from stable_baselines3 import TD3
env = gym.make('Pendulum-v0')
parameters = model.get_parameters()
model.load_parameters(parameters)

Where as the following works properly:

import gym
from stable_baselines3 import TD3
env = gym.make('Pendulum-v0')
parameters = model.get_parameters()
model.set_parameters(parameters)

This is using stable-baselines3 version 1.1.0.

aborger avatar Dec 28 '21 23:12 aborger

You are reading SB documentations, not SB3 :). Stuff here is right.

This is an easy mistake which I have made few times, too (reading SB doc for SB3 stuff). We should consider adding something that makes it blatantly clear which documentation one is reading.

Miffyli avatar Dec 29 '21 01:12 Miffyli

What about adding the version warning as a banner on every page? Screenshot from 2022-08-31 15-53-39

qgallouedec avatar Aug 31 '22 13:08 qgallouedec

sounds good =)

araffin avatar Aug 31 '22 13:08 araffin