ray.rllib.core.learner.learner.Learner.configure_optimizers_for_module#

abstract Learner.configure_optimizers_for_module(module_id: str, config: AlgorithmConfig = None, hps=None) None[source]#

Configures an optimizer for the given module_id.

This method is called for each RLModule in the Multi-Agent RLModule being trained by the Learner, as well as any new module added during training via self.add_module(). It should configure and construct one or more optimizers and register them via calls to self.register_optimizer() along with the module_id, an optional optimizer name (str), a list of the optimizer’s framework specific parameters (variables), and an optional learning rate value or -schedule.

Parameters:
  • module_id – The module_id of the RLModule that is being configured.

  • config – The AlgorithmConfig specific to the given module_id.