Skip to content

Commit

Permalink
[RLlib] Forward fix for failing PPO Torch RLTrainer test (#32308)
Browse files Browse the repository at this point in the history
Signed-off-by: Kourosh Hakhamaneshi <kourosh@anyscale.com>
  • Loading branch information
kouroshHakha authored Feb 8, 2023
1 parent 59c62e4 commit b85eb52
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion rllib/algorithms/ppo/tests/test_ppo_rl_trainer.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@
[[0.1, 0.2, 0.3, 0.4], [0.5, 0.6, 0.7, 0.8], [0.9, 1.0, 1.1, 1.2]],
dtype=np.float32,
),
SampleBatch.NEXT_OBS: np.array(
[[0.1, 0.2, 0.3, 0.4], [0.5, 0.6, 0.7, 0.8], [0.9, 1.0, 1.1, 1.2]],
dtype=np.float32,
),
SampleBatch.ACTIONS: np.array([0, 1, 1]),
SampleBatch.PREV_ACTIONS: np.array([0, 1, 1]),
SampleBatch.REWARDS: np.array([1.0, -1.0, 0.5], dtype=np.float32),
Expand Down Expand Up @@ -57,7 +61,7 @@ def test_loss(self):
.training(
gamma=0.99,
model=dict(
fcnet_hiddens=[10],
fcnet_hiddens=[10, 10],
fcnet_activation="linear",
vf_share_layers=False,
),
Expand Down

0 comments on commit b85eb52

Please sign in to comment.