Skip to content

Commit

Permalink
off-by-one bug in % hyperparameter
Browse files Browse the repository at this point in the history
  • Loading branch information
kzl authored Feb 7, 2022
1 parent f04280e commit e2d82e6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion gym/experiment.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ def experiment(
num_trajectories = 1
timesteps = traj_lens[sorted_inds[-1]]
ind = len(trajectories) - 2
while ind >= 0 and timesteps + traj_lens[sorted_inds[ind]] < num_timesteps:
while ind >= 0 and timesteps + traj_lens[sorted_inds[ind]] <= num_timesteps:
timesteps += traj_lens[sorted_inds[ind]]
num_trajectories += 1
ind -= 1
Expand Down

0 comments on commit e2d82e6

Please sign in to comment.