0

Looking at the pbt_example, I see that the actor's accumulated accuracy is not reset to zero in reset_config, only the new hyperparameters are set (including changing lr in particular). While implementing my own actor, which as state has a running average of the current metric that should be minimized by the hyperparameter sweep, I was wondering if I should reset this running average to zero or not in reset_config? The implications of either resetting this state or not are not clear from the documentation and from browsing the source files of ray.tune.

Would appreciate some clarification on reuse_actors and reset_config, in particular. The documentation is unfortunately a bit vague in this respect. Otherwise great library and easy to get started!

Andreas Schuh
  • 1,147
  • 9
  • 4
  • Thanks a lot for making this issue! ``reuse_actors`` is useful when ``_setup`` takes a long period of time to run. By setting it to True, there is a possibility of not calling ``_setup`` in a future trial because the trial actor/process is being reused. This is where ``reset_config`` comes in - it allows you to specify exactly what should happen when Tune reuses an actor. You should reset the running average to 0 in this case. Does that help answer your question? More than happy to improve docs here! – richliaw Jan 24 '20 at 02:20
  • Thanks, @richliaw, for this clear answer! I would accept if it was submitted as answer rather than comment :-) – Andreas Schuh Jan 27 '20 at 09:42
  • One addition, if `reset_config` serves the same purpose as `_setup`, except for some additional setup steps that may be needed during first object initialization (construction), wouldn't it makes sense for the `Trainable` base class to have a `_setup` and `_set_config` type of functions, where `__init__` calls first `_setup` and then `_set_config`? That way the base class would already encourage no code duplication for common setup steps regardless if actor is being initialized the first time or for consecutive trials. – Andreas Schuh Jan 27 '20 at 09:45

0 Answers0