Skip to content

Commit

Permalink
Update Gymnasium to 1.0.0a1 and remove Atari in favour of ale-py new …
Browse files Browse the repository at this point in the history
…gymnasium implementation (#117)
  • Loading branch information
pseudo-rnd-thoughts authored May 21, 2024
1 parent cb9595e commit 1986692
Show file tree
Hide file tree
Showing 19 changed files with 50 additions and 927 deletions.
14 changes: 14 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates

version: 2
updates:
# Enable version updates for GitHub Actions
- package-ecosystem: "github-actions"
# Look for GitHub Actions workflows in the `root` directory
directory: "/"
# Check the for updates once a week
schedule:
interval: "weekly"
19 changes: 2 additions & 17 deletions .github/workflows/build-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,29 +16,14 @@ on:

jobs:
build-wheels:
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- os: ubuntu-latest
python: 37
platform: manylinux_x86_64
- os: ubuntu-latest
python: 38
platform: manylinux_x86_64
- os: ubuntu-latest
python: 39
platform: manylinux_x86_64
- os: ubuntu-latest
python: 310
platform: manylinux_x86_64
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.x'
python-version: '3.7'
- name: Install dependencies
run: python -m pip install --upgrade setuptools wheel build
- name: Build wheels
Expand Down
19 changes: 0 additions & 19 deletions .github/workflows/optional-test-atari.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/optional-test-meltingpot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
# Melting Pot
- run: |
docker build -f bin/meltingpot.Dockerfile \
--build-arg PYTHON_VERSION='3.10' \
--build-arg PYTHON_VERSION='3.11' \
--tag shimmy-meltingpot-docker .
- name: Run meltingpot tests
run: docker run shimmy-meltingpot-docker pytest tests/test_meltingpot.py
37 changes: 0 additions & 37 deletions bin/atari.Dockerfile

This file was deleted.

15 changes: 7 additions & 8 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ def get_version():
extras = {
"gym-v21": ["gym>=0.21.0,<0.26", "pyglet==1.5.11"],
"gym-v26": ["gym>=0.26.2"],
"atari": ["ale-py~=0.8.1"],
# "imageio" should be "gymnasium[mujoco]>=0.26" but there are install conflicts
"dm-control": ["dm-control>=1.0.10", "imageio", "h5py>=3.7.0"],
"dm-control-multi-agent": [
Expand All @@ -46,16 +45,18 @@ def get_version():
],
"dm-lab": ["dm-env>=1.6"],
"openspiel": ["open_spiel>=1.2", "pettingzoo>=1.23"],
"meltingpot": ["pettingzoo>=1.23", "dm-meltingpot>=2.2.0; python_version > '3.9'"],
"meltingpot": [
"pettingzoo>=1.23",
"dm-meltingpot>=2.2.2; python_version > '3.10'",
],
"bsuite": ["bsuite>=0.3.5"],
}
extras["all"] = [
lib for key, libs in extras.items() if key != "gym-v21" for lib in libs
]
extras["testing"] = [
"pytest==7.1.3",
"pytest>=7.1.3",
"pillow>=9.3.0",
"autorom[accept-rom-license]~=0.6.0",
]

setup(
Expand All @@ -71,19 +72,17 @@ def get_version():
keywords=["Reinforcement Learning", "game", "RL", "AI"],
python_requires=">=3.8",
packages=find_packages(),
install_requires=["numpy>=1.18.0", "gymnasium>=0.27.0"],
install_requires=["numpy>=1.18.0", "gymnasium>=1.0.0a1"],
tests_require=extras["testing"],
extras_require=extras,
classifiers=[
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
],
include_package_data=True,
entry_points={
"gymnasium.envs": ["__root__ = shimmy.registration:register_gymnasium_envs"]
},
)
6 changes: 5 additions & 1 deletion shimmy/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@

from shimmy.dm_lab_compatibility import DmLabCompatibilityV0
from shimmy.openai_gym_compatibility import GymV21CompatibilityV0, GymV26CompatibilityV0
from shimmy.registration import register_gymnasium_envs

# this registers the environments on `import shimmy`
register_gymnasium_envs()


class NotInstallClass:
Expand Down Expand Up @@ -73,7 +77,7 @@ def __call__(self, *args: list[Any], **kwargs: Any):
]


__version__ = "1.3.0"
__version__ = "2.0.0"


try:
Expand Down
Loading

0 comments on commit 1986692

Please sign in to comment.