Skip to content

Commit

Permalink
Remove FloatReward. Fixes #794
Browse files Browse the repository at this point in the history
  • Loading branch information
ernestum committed Dec 11, 2023
1 parent 629ef9a commit df975b2
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions tests/algorithms/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,20 +113,10 @@ def pendulum_single_venv(rng) -> VecEnv:
)


# TODO(GH#794): Remove after https://github.com/DLR-RM/stable-baselines3/pull/1676
# merged and released.
class FloatReward(gym.RewardWrapper):
"""Typecasts reward to a float."""

def reward(self, reward):
return float(reward)


@pytest.fixture
def multi_obs_venv() -> VecEnv:
def make_env():
env = envs.SimpleMultiObsEnv(channel_last=False)
env = FloatReward(env)
return RolloutInfoWrapper(env)

return DummyVecEnv([make_env, make_env])

0 comments on commit df975b2

Please sign in to comment.