-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[RLlib] PPO torch RLTrainer (#31801)
Signed-off-by: Kourosh Hakhamaneshi <kourosh@anyscale.com>
- Loading branch information
1 parent
3f43969
commit 1f77e04
Showing
17 changed files
with
839 additions
and
75 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
from dataclasses import dataclass | ||
from typing import List, Optional, Union | ||
|
||
from ray.rllib.core.rl_trainer.rl_trainer import RLTrainerHPs | ||
|
||
|
||
@dataclass | ||
class PPORLTrainerHPs(RLTrainerHPs): | ||
"""Hyperparameters for the PPO RL Trainer""" | ||
|
||
kl_coeff: float = 0.2 | ||
kl_target: float = 0.01 | ||
use_critic: bool = True | ||
clip_param: float = 0.3 | ||
vf_clip_param: float = 10.0 | ||
entropy_coeff: float = 0.0 | ||
vf_loss_coeff: float = 1.0 | ||
|
||
# experimental placeholder for things that could be part of the base RLTrainerHPs | ||
lr_schedule: Optional[List[List[Union[int, float]]]] = None | ||
entropy_coeff_schedule: Optional[List[List[Union[int, float]]]] = None |
Oops, something went wrong.