rlberry icon indicating copy to clipboard operation
rlberry copied to clipboard

Attributes docstrings

Open TimotheeMathieu opened this issue 2 years ago • 4 comments

For now there is practically no attribute documentation except in Agent and AgentWithSimplePolicy. It would be nice to have this for every agent. and every environment also.

TimotheeMathieu avatar May 11 '22 15:05 TimotheeMathieu

PR: #349 : Done with DQN-PPO-REINFORCE. To do torch: A2C-MDQN. To do non-torch: all of them.

KohlerHECTOR avatar Jul 24 '23 10:07 KohlerHECTOR

To do torch: A2C-MDQN. To do non-torch: all of them.

KohlerHECTOR avatar Jul 24 '23 12:07 KohlerHECTOR

So far, we have put all attributes. These are often just a copy and paste of the parameters, leading to some redundancy. I understand it could be helpful to have both things, but do you think this is the best way to do it? The docstring will be quite long in this way.

riccardodv avatar Jul 24 '23 15:07 riccardodv

Maybe it would be sufficient to document the attributes that are not arguments but created during the fit. A bit like in scikit-learn ;) . in the case of scikit-learn, the attributes that could be reused by the user are denoted with a "" at the end (e.g. regressor.coef ) they say "an attribute that have a meaningful value after fit() was called". Maybe we could take the same convention for rlberry agents ?

TimotheeMathieu avatar Jul 24 '23 15:07 TimotheeMathieu