Skip to content

Commit

Permalink
Upgrade Gymanasium to v1.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
takuseno committed Oct 12, 2024
1 parent a096424 commit b699b52
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion d3rlpy/datasets.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
from gym.wrappers.time_limit import TimeLimit
from gymnasium.spaces import Box as GymnasiumBox
from gymnasium.spaces import Dict as GymnasiumDictSpace
from gymnasium.wrappers.time_limit import TimeLimit as GymnasiumTimeLimit
from gymnasium.wrappers import TimeLimit as GymnasiumTimeLimit

from .dataset import (
BasicTrajectorySlicer,
Expand Down
6 changes: 3 additions & 3 deletions examples/deepmind_control.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import argparse

import gymnasium
from gymnasium.wrappers.flatten_observation import FlattenObservation
from gymnasium.wrappers import FlattenObservation

import d3rlpy

Expand All @@ -21,8 +21,8 @@ def main() -> None:
args = parser.parse_args()

env_id = f"dm_control/{args.env}"
env = FlattenObservation(gymnasium.make(env_id))
eval_env = FlattenObservation(gymnasium.make(env_id))
env = FlattenObservation(gymnasium.make(env_id)) # type: ignore
eval_env = FlattenObservation(gymnasium.make(env_id)) # type: ignore

# fix seed
d3rlpy.seed(args.seed)
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ click==8.0.1
typing-extensions==3.7.4.3
structlog==20.2.0
colorama==0.4.4
gymnasium==0.29.0
gymnasium==1.0.0
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
"structlog",
"colorama",
"dataclasses-json",
"gymnasium",
"gymnasium>=1.0.0",
],
packages=find_packages(exclude=["tests*"]),
python_requires=">=3.8.0",
Expand Down

0 comments on commit b699b52

Please sign in to comment.