Skip to content

Commit

Permalink
fix: normalize_reward modifies the ends in-placely
Browse files Browse the repository at this point in the history
  • Loading branch information
typoverflow committed Jul 18, 2023
1 parent 9297785 commit f69cbf1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion offlinerllib/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@

__version__ = "0.0.10"
__version__ = "0.0.11"
2 changes: 1 addition & 1 deletion offlinerllib/utils/d4rl.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ def antmaze_normalize_reward(dataset):
return dataset, {}

def mujoco_normalize_reward(dataset):
split_points = dataset["ends"]
split_points = dataset["ends"].copy()
split_points[-1] = False # the last traj may be incomplete, so we discard them
reward = dataset["rewards"]
returns, lengths = [], []
Expand Down

0 comments on commit f69cbf1

Please sign in to comment.