Skip to content

Commit

Permalink
fix dataratio bug
Browse files Browse the repository at this point in the history
  • Loading branch information
ZhengYinan-AIR committed Dec 9, 2023
1 parent 6164990 commit 261c602
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion jaxrl5/data/dsrl_datasets.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def __init__(self, env: gym.Env, clip_to_eps: bool = True, eps: float = 1e-5, cr
file_list = dataset_name.split('-')
ratio_num = int(float(file_list[-1].split('.')[0]) * ratio)
dataset_ratio = '-'.join(file_list[:-1]) + '-' + str(ratio_num) + '-' + str(ratio) + '.hdf5'
dataset_dict = env.get_dataset(dataset_ratio)
dataset_dict = env.get_dataset(os.path.join('data', dataset_ratio))
print('max_episode_reward', env.max_episode_reward,
'min_episode_reward', env.min_episode_reward,
'mean_episode_reward', env._max_episode_steps * np.mean(dataset_dict['rewards']))
Expand Down

0 comments on commit 261c602

Please sign in to comment.