-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Description
I have spent roughly a year now doing RL research with tianshou and have been really enjoying the library.
Especially the high-level API saves a lot of tedious boiler plate code.
However, when doing custom implementations, I often come across this one annoying limitation: It's not possible to change the Collector
class for the AgentFactory
.
Defining a custom Collector
in my experience, has a lot of use cases (e.g., modifying actions sent to the environment, or logging custom statistics additional to reward and length).
Using the custom Collector
in the low-level API is straight forward, but the previously-mentioned limitation prohibits the usage in the high-level API.
I believe a simple addition to the ExperimentBuilder
and AgentFactory
that allows setting a custom Collector
class would make the high-level API much more flexible. One could, for instance, add the method ExperimentBuilder.with_collector_class
(or something similar) to the ExperimentBuilder
.
What do you developers think about this suggestion? If you think it's a good idea, I can also create a merge request.