ray.rllib.core.learner.learner.LearnerHyperparameters#
- class ray.rllib.core.learner.learner.LearnerHyperparameters(learning_rate: float | List[List[int | float]] = None, grad_clip: float = None, grad_clip_by: str = None, seed: int = None, _per_module_overrides: Dict[str, LearnerHyperparameters] | None = None)[source]#
Hyperparameters for a Learner, derived from a subset of AlgorithmConfig values.
Instances of this class should only be created via calling
get_learner_hyperparameters()
on a frozen AlgorithmConfig object and should always considered read-only.When creating a new Learner, you should also define a new sub-class of this class and make sure the respective AlgorithmConfig sub-class has a proper implementation of the
get_learner_hyperparameters
method.Validation of the values of these hyperparameters should be done by the respective AlgorithmConfig class.
For configuring different learning behaviors for different (single-agent) RLModules within the Learner, RLlib uses the
_per_module_overrides
property (dict), mapping ModuleID to a overridden version of self, in which the module-specific override settings are applied.Methods
Returns a LearnerHyperparameter instance, given a
module_id
.Attributes