ray.rllib.core.learner.learner.LearnerHyperparameters
ray.rllib.core.learner.learner.LearnerHyperparameters#
- class ray.rllib.core.learner.learner.LearnerHyperparameters(learning_rate: Optional[Union[float, List[List[Union[int, float]]]]] = None, grad_clip: Optional[float] = None, grad_clip_by: Optional[str] = None, seed: Optional[int] = None, _per_module_overrides: Optional[Dict[str, ray.rllib.core.learner.learner.LearnerHyperparameters]] = None)[source]#
Bases:
objectHyperparameters 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_hyperparametersmethod.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_overridesproperty (dict), mapping ModuleID to a overridden version of self, in which the module-specific override settings are applied.Methods
get_hps_for_module(module_id)Returns a LearnerHyperparameter instance, given a
module_id.Attributes