Skip to content

Commit

Permalink
Ignoring some linter warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
DT6A authored Jun 20, 2023
1 parent 783cee0 commit f4fac15
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions algorithms/finetune/cal_ql.py
Original file line number Diff line number Diff line change
Expand Up @@ -285,21 +285,21 @@ def get_return_to_go(dataset: Dict, env: gym.Env, config: TrainConfig) -> np.nda
ep_len += 1
is_last_step = (
(t == N - 1)
or (
or ( # noqa
np.linalg.norm(
dataset["observations"][t + 1] - dataset["next_observations"][t]
)
> 1e-6
> 1e-6 # noqa
)
or ep_len == env._max_episode_steps
or ep_len == env._max_episode_steps # noqa
)

if d or is_last_step:
discounted_returns = [0] * ep_len
prev_return = 0
if (
config.is_sparse_reward
and r == env.ref_min_score * config.reward_scale + config.reward_bias
and r == env.ref_min_score * config.reward_scale + config.reward_bias #noqa
):
discounted_returns = [r / (1 - config.discount)] * ep_len
else:
Expand Down

0 comments on commit f4fac15

Please sign in to comment.