thu-ml / tianshou

An elegant PyTorch deep reinforcement learning library.
https://tianshou.org
MIT License
7.76k stars 1.12k forks source link

Better interfaces and names for Actor, Critic, Net and other classes #1091

Open MischaPanch opened 5 months ago

MischaPanch commented 5 months ago

All annotations with nn.Module should be replaced. @opcode81 feel free to extend the description, if you want to.

We could make it backwards compatible and use of the deprecation project by doing something like

@deprecated(
    deprecated_in="1.1.0",
    removed_in="2.0.0",
    details="This class has been renamed. Use CriticDiscrete instead",
)
class Critic(CriticDiscrete):
   pass
Trinkle23897 commented 3 months ago

You should consider typing_extensions.deprecated: https://typing-extensions.readthedocs.io/en/latest/index.html#typing_extensions.deprecated