Skip to content

Commit

Permalink
fix pre-commit
Browse files Browse the repository at this point in the history
  • Loading branch information
vwxyzjn committed Oct 16, 2023
1 parent 6220645 commit adbf836
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 8 deletions.
2 changes: 1 addition & 1 deletion cleanrl/dqn.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ class Args:
"""the replay memory buffer size"""
gamma: float = 0.99
"""the discount factor gamma"""
tau: float = 1.
tau: float = 1.0
"""the target network update rate"""
target_network_frequency: int = 500
"""the timesteps it takes to update the target network"""
Expand Down
2 changes: 1 addition & 1 deletion cleanrl/dqn_atari.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ class Args:
"""the replay memory buffer size"""
gamma: float = 0.99
"""the discount factor gamma"""
tau: float = 1.
tau: float = 1.0
"""the target network update rate"""
target_network_frequency: int = 1000
"""the timesteps it takes to update the target network"""
Expand Down
5 changes: 1 addition & 4 deletions cleanrl/ppg_procgen.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,6 @@ class Args:
n_aux_grad_accum: int = 1
"""the number of gradient accumulation in mini batch"""



# to be filled in runtime
batch_size: int = 0
"""the batch size (computed in runtime)"""
Expand Down Expand Up @@ -283,7 +281,6 @@ def get_pi(self, x):
start_time = time.time()
next_obs = torch.Tensor(envs.reset()).to(device)
next_done = torch.zeros(args.num_envs).to(device)


for phase in range(1, args.num_phases + 1):

Expand Down Expand Up @@ -397,7 +394,7 @@ def get_pi(self, x):
optimizer.step()

if args.target_kl is not None and approx_kl > args.target_kl:
break
break

y_pred, y_true = b_values.cpu().numpy(), b_returns.cpu().numpy()
var_y = np.var(y_true)
Expand Down
2 changes: 0 additions & 2 deletions cleanrl/qdagger_dqn_atari_jax_impalacnn.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
# docs and experiment results can be found at https://docs.cleanrl.dev/rl-algorithms/qdagger/#qdagger_dqn_atari_jax_impalacnnpy
import argparse
import os
import random
import time
from collections import deque
from distutils.util import strtobool
from typing import Sequence

os.environ[
Expand Down

0 comments on commit adbf836

Please sign in to comment.