Skip to content

Commit

Permalink
Improve docstring of CriticFactoryReuseActor
Browse files Browse the repository at this point in the history
  • Loading branch information
opcode81 committed Aug 8, 2024
1 parent ee90cb5 commit 8114dd1
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tianshou/highlevel/module/critic.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,12 @@ class CriticFactoryReuseActor(CriticFactory):
"""A critic factory which reuses the actor's preprocessing component.
This class is for internal use in experiment builders only.
Reuse of the actor network is supported through the concept of an actor future (:class:`ActorFuture`).
When the user declares that he wants to reuse the actor for the critic, we use this factory to support this,
but the actor does not exist yet. So the factory instead receives the future, which will eventually be filled
when the actor factory is called. When the creation method of this factory is eventually called, it can use the
then-filled actor to create the critic.
"""

def __init__(self, actor_future: ActorFuture):
Expand Down

0 comments on commit 8114dd1

Please sign in to comment.